guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49780] [PATCH 03/14] import: gem: Use PARSE-COMMAND-LINE for option


From: Sarah Morgensen
Subject: [bug#49780] [PATCH 03/14] import: gem: Use PARSE-COMMAND-LINE for options.
Date: Thu, 29 Jul 2021 20:54:59 -0700

guix/scripts/import/gem.scm (guix-import-gem)[parse-options]: Use
PARSE-COMMAND-LINE instead of ARGS-FOLD*.
---
 guix/scripts/import/gem.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm
index c64596b514..65d2bf10b4 100644
--- a/guix/scripts/import/gem.scm
+++ b/guix/scripts/import/gem.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,12 +74,8 @@ Import and convert the RubyGems package for 
PACKAGE-NAME.\n"))
 (define (guix-import-gem . 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
-- 
2.31.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]