guix package: Warn when invoked with '-u -something'.
Fixes <https://bugs.gnu.org/27820>. Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>. * guix/scripts/package.scm (%options) <"-u">: Emit a warning when ARG starts with "-".
This commit is contained in:
parent
a6b5af0cff
commit
6ddf97f81b
@ -486,6 +486,11 @@ Install, remove, or upgrade packages in a single transaction.\n"))
|
|||||||
arg-handler))))
|
arg-handler))))
|
||||||
(option '(#\u "upgrade") #f #t
|
(option '(#\u "upgrade") #f #t
|
||||||
(lambda (opt name arg result arg-handler)
|
(lambda (opt name arg result arg-handler)
|
||||||
|
(when (string-prefix? "-" arg)
|
||||||
|
(warning (G_ "upgrade regexp '~a' looks like a \
|
||||||
|
command-line option~%")
|
||||||
|
arg)
|
||||||
|
(warning (G_ "is this intended?~%")))
|
||||||
(let arg-handler ((arg arg) (result result))
|
(let arg-handler ((arg arg) (result result))
|
||||||
(values (alist-cons 'upgrade arg
|
(values (alist-cons 'upgrade arg
|
||||||
;; Delete any prior "upgrade all"
|
;; Delete any prior "upgrade all"
|
||||||
|
Loading…
Reference in New Issue
Block a user