guix package: Allow `guix package -u' to fuction as before.

This is a follow up to 6ddf97f81b

* guix/scripts/package.scm (%options) <"-u">: Only check for a flag when
there is an ARG after '-u'.
This commit is contained in:
Efraim Flashner 2017-08-01 23:02:26 +03:00
parent d0386db493
commit a60667245f
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

View File

@ -486,7 +486,7 @@ Install, remove, or upgrade packages in a single transaction.\n"))
arg-handler))))
(option '(#\u "upgrade") #f #t
(lambda (opt name arg result arg-handler)
(when (string-prefix? "-" arg)
(when (and arg (string-prefix? "-" arg))
(warning (G_ "upgrade regexp '~a' looks like a \
command-line option~%")
arg)