diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-10-27 13:28:00 -0700 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-10-28 09:45:53 +0200 |
commit | a1ff7e1d8dfb86ae1817d4e0db4ddeebd2083e83 (patch) | |
tree | 37ae378568444d592f17174bfc90533c55d18a38 /guix/scripts/lint.scm | |
parent | ed1f071e98126ceb992faf5f22762f24d36ba9ff (diff) |
scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'.
* guix/scripts.scm (parse-command-line): Add #:build-options? parameter
and honor it.
* guix/scripts/challenge.scm (guix-challenge): Use 'parse-command-line'
with #:build-options? #f instead of 'args-fold*'.
* guix/scripts/gc.scm (guix-gc): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/hash.scm (guix-hash): Likewise.
* guix/scripts/lint.scm (guix-lint): Likewise.
* guix/scripts/refresh.scm (guix-refresh): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r-- | guix/scripts/lint.scm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index a26f92f49c..0338d4cb13 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -1123,12 +1123,8 @@ run the checkers on all packages.\n")) (define (guix-lint . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda |