From d89e0990f50a00cd4eddd781f31c7a801b0bc9c3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Sep 2015 00:04:27 +0200 Subject: guix system: Gracefully handle incomplete commands. Fixes . Reported by Steve Sprang . * guix/scripts/system.scm (guix-system)[option-arguments]: Error out when ACTION is #f. --- guix/scripts/system.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guix') 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) -- cgit v1.2.3