guix-commits
[Top][All Lists]
Advanced

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

01/01: guix system: Gracefully handle incomplete commands.


From: Ludovic Courtès
Subject: 01/01: guix system: Gracefully handle incomplete commands.
Date: Mon, 14 Sep 2015 22:33:40 +0000

civodul pushed a commit to branch master
in repository guix.

commit d89e0990f50a00cd4eddd781f31c7a801b0bc9c3
Author: Ludovic Courtès <address@hidden>
Date:   Tue Sep 15 00:04:27 2015 +0200

    guix system: Gracefully handle incomplete commands.
    
    Fixes <http://bugs.gnu.org/21451>.
    Reported by Steve Sprang <address@hidden>.
    
    * guix/scripts/system.scm (guix-system)[option-arguments]: Error out
      when ACTION is #f.
---
 guix/scripts/system.scm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 45f5982..56a9011 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -514,6 +514,13 @@ Build the operating system declared in FILE according to 
ACTION.\n"))
         (leave (_ "wrong number of arguments for action '~a'~%")
                action))
 
+      (unless action
+        (format (current-error-port)
+                (_ "guix system: missing command name~%"))
+        (format (current-error-port)
+                (_ "Try 'guix system --help' for more information.~%"))
+        (exit 1))
+
       (case action
         ((build vm vm-image disk-image reconfigure)
          (unless (= count 1)



reply via email to

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