summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-26 00:00:04 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-26 00:04:36 +0100
commitcf6ce3e6ef96abc36a40293b2d9f732d462d2a94 (patch)
treec49727c6364ecb723d2456239eaf3177270d1035 /guix
parentb3f213893b67620840597213b8f46af1ddfb4934 (diff)
downloadgnu-guix-cf6ce3e6ef96abc36a40293b2d9f732d462d2a94.tar
gnu-guix-cf6ce3e6ef96abc36a40293b2d9f732d462d2a94.tar.gz
ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS.
Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>. * guix/ui.scm (parse-command-line)[parse-options-from]: Add 'seeds' parameter. Thread the result of the first 'parse-options-from' call to the second.
Diffstat (limited to 'guix')
-rw-r--r--guix/ui.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 09cb6f48ff..9558d38ca8 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -769,7 +769,7 @@ Command-line options take precedence those passed via 'GUIX_BUILD_OPTIONS'.
ARGUMENT-HANDLER is called for non-option arguments, like the 'operand-proc'
parameter of 'args-fold'."
- (define (parse-options-from args)
+ (define (parse-options-from args seeds)
;; Actual parsing takes place here.
(apply args-fold* args options
(lambda (opt name arg . rest)
@@ -777,8 +777,12 @@ parameter of 'args-fold'."
argument-handler
seeds))
- (append (parse-options-from args)
- (parse-options-from (environment-build-options))))
+ (call-with-values
+ (lambda ()
+ (parse-options-from (environment-build-options) seeds))
+ (lambda seeds
+ ;; ARGS take precedence over what the environment variable specifies.
+ (parse-options-from args seeds))))
(define (show-guix-usage)
(format (current-error-port)