aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-15 00:04:27 +0200
committerLudovic Courtès <ludo@gnu.org>2015-09-15 00:04:27 +0200
commitd89e0990f50a00cd4eddd781f31c7a801b0bc9c3 (patch)
treea35540e54fcf14de4e289428d995076dc9524321 /guix/scripts/system.scm
parent17d8e33f316b7e88aa06452f873b59770989f1b6 (diff)
downloadgnu-guix-d89e0990f50a00cd4eddd781f31c7a801b0bc9c3.tar
gnu-guix-d89e0990f50a00cd4eddd781f31c7a801b0bc9c3.tar.gz
guix system: Gracefully handle incomplete commands.
Fixes <http://bugs.gnu.org/21451>. Reported by Steve Sprang <steve.sprang@gmail.com>. * guix/scripts/system.scm (guix-system)[option-arguments]: Error out when ACTION is #f.
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 45f598219d..56a9011e94 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)