Subject: [bug#49780] [PATCH 13/14] import: hackage: Use PARSE-COMMAND-LINE for options.

From: Sarah Morgensen <[email-masked]>
Date: Thu, 29 Jul 2021 20:55:09 -0700

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

diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm
index 906dca24b1..83128fb816 100644
--- a/guix/scripts/import/hackage.scm
+++ b/guix/scripts/import/hackage.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <[email-masked]>
 ;;; Copyright © 2018 Ricardo Wurmus <[email-masked]>
+;;; Copyright © 2021 Sarah Morgensen <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -105,12 +106,8 @@ version.\n"))
 (define (guix-import-hackage . 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))
 
   (define (run-importer package-name opts error-fn)
     (let* ((arguments (list
-- 
2.31.1