From efff3dd4c984f0c2e6f8cb63cf109a6c7b89dea0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 27 Oct 2017 13:11:26 -0700 Subject: scripts: Use 'args-fold*' for command that do not honor build flags. Fixes . 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. --- guix/scripts/weather.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'guix/scripts/weather.scm') diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 4c4dfac8f6..7f42f9475d 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -204,8 +204,12 @@ Report the availability of substitutes.\n")) (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) -- cgit v1.2.3