scripts: Use 'args-fold*' for command that do not honor build flags.
Fixes <https://bugs.gnu.org/28984>. Reported by Eric Bavier. * guix/scripts/challenge.scm (guix-challenge): Use 'args-fold*' instead of 'parse-command-line'. * guix/scripts/size.scm (guix-size): Likewise. * guix/scripts/weather.scm (guix-weather): Likewise.
This commit is contained in:
parent
50942a690e
commit
efff3dd4c9
|
@ -278,7 +278,12 @@ (define %default-options
|
|||
|
||||
(define (guix-challenge . args)
|
||||
(with-error-handling
|
||||
(let* ((opts (parse-command-line args %options (list %default-options)))
|
||||
(let* ((opts (args-fold* args %options
|
||||
(lambda (opt name arg . rest)
|
||||
(leave (G_ "~A: unrecognized option~%") name))
|
||||
(lambda (arg result)
|
||||
(alist-cons 'argument arg result))
|
||||
%default-options))
|
||||
(files (filter-map (match-lambda
|
||||
(('argument . file) file)
|
||||
(_ #f))
|
||||
|
|
|
@ -291,7 +291,12 @@ (define %default-options
|
|||
|
||||
(define (guix-size . args)
|
||||
(with-error-handling
|
||||
(let* ((opts (parse-command-line args %options (list %default-options)))
|
||||
(let* ((opts (args-fold* args %options
|
||||
(lambda (opt name arg . rest)
|
||||
(leave (G_ "~A: unrecognized option~%") name))
|
||||
(lambda (arg result)
|
||||
(alist-cons 'argument arg result))
|
||||
%default-options))
|
||||
(files (filter-map (match-lambda
|
||||
(('argument . file) file)
|
||||
(_ #f))
|
||||
|
|
|
@ -204,8 +204,12 @@ (define (load-manifest file)
|
|||
|
||||
(define (guix-weather . args)
|
||||
(with-error-handling
|
||||
(let* ((opts (parse-command-line args %options
|
||||
(list %default-options)))
|
||||
(let* ((opts (args-fold* args %options
|
||||
(lambda (opt name arg . rest)
|
||||
(leave (G_ "~A: unrecognized option~%") name))
|
||||
(lambda (arg result)
|
||||
(alist-cons 'argument arg result))
|
||||
%default-options))
|
||||
(urls (assoc-ref opts 'substitute-urls))
|
||||
(systems (match (filter-map (match-lambda
|
||||
(('system . system) system)
|
||||
|
|
Loading…
Reference in a new issue