mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
scripts: publish: Replace 'args-fold*' by 'parse-command-line'.
* guix/scripts/publish.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
f4070b153d
commit
ec3090e0c2
1 changed files with 6 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
|||
;;; Copyright © 2020 by Amar M. Singh <nly@disroot.org>
|
||||
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -1117,12 +1118,11 @@ (define-command (guix-publish . args)
|
|||
(synopsis "publish build results over HTTP")
|
||||
|
||||
(with-error-handling
|
||||
(let* ((opts (args-fold* args %options
|
||||
(lambda (opt name arg result)
|
||||
(leave (G_ "~A: unrecognized option~%") name))
|
||||
(lambda (arg result)
|
||||
(leave (G_ "~A: extraneous argument~%") arg))
|
||||
%default-options))
|
||||
(let* ((opts (parse-command-line args %options (list %default-options)
|
||||
#:build-options? #f
|
||||
#:argument-handler
|
||||
(lambda (arg result)
|
||||
(leave (G_ "~A: extraneous argument~%") arg))))
|
||||
(advertise? (assoc-ref opts 'advertise?))
|
||||
(user (assoc-ref opts 'user))
|
||||
(port (assoc-ref opts 'port))
|
||||
|
|
Loading…
Reference in a new issue