[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29409] [PATCH v2 3/4] scripts: system: Add --expression option.
From: |
Mathieu Othacehe |
Subject: |
[bug#29409] [PATCH v2 3/4] scripts: system: Add --expression option. |
Date: |
Fri, 15 Dec 2017 12:18:44 +0100 |
User-agent: |
mu4e 0.9.18; emacs 25.3.1 |
> 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
[bug#29409] [PATCH v2 1/4] vm: Adapt qemu command to ARM., Ludovic Courtès, 2017/12/15