[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: edit: Do not honor 'GUIX_BUILD_OPTIONS'.
From: |
Ludovic Courtès |
Subject: |
02/02: edit: Do not honor 'GUIX_BUILD_OPTIONS'. |
Date: |
Fri, 19 Aug 2016 15:35:01 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 00677a7e554c79692878bbf56886689c64cd02c1
Author: Ludovic Courtès <address@hidden>
Date: Fri Aug 19 17:33:10 2016 +0200
edit: Do not honor 'GUIX_BUILD_OPTIONS'.
* guix/scripts/edit.scm (guix-edit)[parse-arguments]: New procedure.
Use it.
---
guix/scripts/edit.scm | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index ce3ac41..555796a 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015, 2016 Ludovic Courtès <address@hidden>
;;; Copyright © 2015 Mathieu Lirzin <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -74,9 +74,16 @@ line."
(define (guix-edit . args)
+ (define (parse-arguments)
+ ;; Return the list of package names.
+ (args-fold* args %options
+ (lambda (opt name arg result)
+ (leave (_ "~A: unrecognized option~%") name))
+ cons
+ '()))
+
(with-error-handling
- (let* ((specs (parse-command-line args %options '(())
- #:argument-handler cons))
+ (let* ((specs (reverse (parse-arguments)))
(packages (map specification->package specs)))
(for-each (lambda (package)
(unless (package-location package)