~ruther/guix-local

d89e0990f50a00cd4eddd781f31c7a801b0bc9c3 — Ludovic Courtès 10 years ago 17d8e33
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.
1 files changed, 7 insertions(+), 0 deletions(-)

M guix/scripts/system.scm
M guix/scripts/system.scm => guix/scripts/system.scm +7 -0
@@ 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)