Subject: Re: [bug#29409] [PATCH v2 3/4] scripts: system: Add --expression option.

From: Mathieu Othacehe <[email-masked]>
Date: Fri, 15 Dec 2017 12:18:44 +0100

> What happens if we run “guix system vm”?  Do we still get a proper
> error?

Nope, it's a mistake, would this be better ?

@@ -1079,7 +1093,8 @@ argument list and OPTS is the option alist."
     ;; Extract the plain arguments from OPTS.
     (let* ((args   (reverse (filter-map (match-pair 'argument) opts)))
            (count  (length args))
-           (action (assoc-ref opts 'action)))
+           (action (assoc-ref opts 'action))
+           (expr   (assoc-ref opts 'expression)))
       (define (fail)
         (leave (G_ "wrong number of arguments for action '~a'~%")
                action))
@@ -1093,7 +1108,8 @@ argument list and OPTS is the option alist."
 
       (case action
         ((build container vm vm-image disk-image reconfigure)
-         (unless (= count 1)
+         (unless (or (= count 1)
+                     (and expr (= count 0)))

Thanks,

Mathieu