guix-commits
[Top][All Lists]
Advanced

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

branch master updated: pull: Accept no non-option arguments.


From: guix-commits
Subject: branch master updated: pull: Accept no non-option arguments.
Date: Sat, 05 Dec 2020 10:51:23 -0500

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 4d0b61a  pull: Accept no non-option arguments.
4d0b61a is described below

commit 4d0b61a1f6ff99ff1795b876841e84e136b05186
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sat Dec 5 16:46:47 2020 +0100

    pull: Accept no non-option arguments.
    
    * guix/scripts/pull.scm (guix-pull): LEAVE if any non-option arguments
    were passed.
---
 guix/scripts/pull.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 7fd8b3f..83cdc1d 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès 
<ludo@gnu.org>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -754,10 +755,14 @@ Use '~/.config/guix/channels.scm' instead."))
 (define-command (guix-pull . args)
   (synopsis "pull the latest revision of Guix")
 
+  (define (no-arguments arg _‌)
+    (leave (G_ "~A: extraneous argument~%") arg))
+
   (with-error-handling
     (with-git-error-handling
      (let* ((opts         (parse-command-line args %options
-                                              (list %default-options)))
+                                              (list %default-options)
+                                              #:argument-handler no-arguments))
             (substitutes? (assoc-ref opts 'substitutes?))
             (dry-run?     (assoc-ref opts 'dry-run?))
             (channels     (channel-list opts))



reply via email to

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