[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#46429] [PATCH 1/1] scripts: time-machine: Fail when unrecognized op
From: |
zimoun |
Subject: |
[bug#46429] [PATCH 1/1] scripts: time-machine: Fail when unrecognized option. |
Date: |
Wed, 10 Feb 2021 22:48:04 +0100 |
* guix/scripts/time-machine (parse-args): Fail when unrecognized option.
---
guix/scripts/time-machine.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index 0d27414702..c6ab30e132 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -118,6 +119,8 @@ Execute COMMAND ARGS... in an older version of Guix.\n"))
(let-values (((args command) (break (cut string=? "--" <>) args)))
(let ((opts (parse-command-line args %options
(list %default-options))))
+ (when (assoc-ref opts 'argument)
+ (leave (G_ "unrecognized option~%")))
(match command
(() opts)
(("--") opts)
--
2.29.2