diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2016-08-29 23:46:33 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2016-08-29 23:46:33 +0300 |
commit | b3d2be945d2dfe08e3b73102dd0fd3f4a0a93b60 (patch) | |
tree | 707c6a5e18474b410e39fa6892521c9f47518ccc /guix/scripts/edit.scm | |
parent | 97127431ee9133626fea62449706d729d80b73f6 (diff) | |
parent | 5b63a8568b39c019970569773bace18fab17a157 (diff) |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts/edit.scm')
-rw-r--r-- | guix/scripts/edit.scm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index ce3ac4146d..555796a69c 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 <ludo@gnu.org> +;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org> ;;; ;;; 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) |