guix-patches
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: [bug#29409] [PATCH v2 3/4] scripts: system: Add --expression option.
Date: Fri, 15 Dec 2017 15:03:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Mathieu Othacehe <address@hidden> skribis:

>> 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)))

It looks better, yes.  Thanks!

Ludo’.





reply via email to

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