Skip to content
Snippets Groups Projects
Unverified Commit 6ddf97f8 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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 "-".
parent a6b5af0c
No related branches found
No related tags found
No related merge requests found
...@@ -486,6 +486,11 @@ (define %options ...@@ -486,6 +486,11 @@ (define %options
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment