pull: Accept no non-option arguments.
* guix/scripts/pull.scm (guix-pull): LEAVE if any non-option arguments were passed.
This commit is contained in:
parent
cebfb29abb
commit
4d0b61a1f6
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
||||||
|
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
|
@ -754,10 +755,14 @@ Use '~/.config/guix/channels.scm' instead."))
|
||||||
(define-command (guix-pull . args)
|
(define-command (guix-pull . args)
|
||||||
(synopsis "pull the latest revision of Guix")
|
(synopsis "pull the latest revision of Guix")
|
||||||
|
|
||||||
|
(define (no-arguments arg _)
|
||||||
|
(leave (G_ "~A: extraneous argument~%") arg))
|
||||||
|
|
||||||
(with-error-handling
|
(with-error-handling
|
||||||
(with-git-error-handling
|
(with-git-error-handling
|
||||||
(let* ((opts (parse-command-line args %options
|
(let* ((opts (parse-command-line args %options
|
||||||
(list %default-options)))
|
(list %default-options)
|
||||||
|
#:argument-handler no-arguments))
|
||||||
(substitutes? (assoc-ref opts 'substitutes?))
|
(substitutes? (assoc-ref opts 'substitutes?))
|
||||||
(dry-run? (assoc-ref opts 'dry-run?))
|
(dry-run? (assoc-ref opts 'dry-run?))
|
||||||
(channels (channel-list opts))
|
(channels (channel-list opts))
|
||||||
|
|
|
||||||
Reference in a new issue