GNU bug report logs -
#46429
[PATCH 0/1] guix time-machine: fail when unrecognized option
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Wed, 10 Feb 2021 21:40:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* 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 <at> fastmail.net>
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> 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
This bug report was last modified 4 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.