[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: time-machine: Warn when no command is given.
From: |
guix-commits |
Subject: |
05/06: time-machine: Warn when no command is given. |
Date: |
Sun, 5 Nov 2023 17:26:17 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 331d858e21357c1cf657818dfb4296c3d15629b6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Oct 28 15:58:54 2023 +0200
time-machine: Warn when no command is given.
* guix/scripts/time-machine.scm (guix-time-machine): Emit a warning when
COMMAND-LINE is false.
Change-Id: I26e6b608915ecaf6d9372f9b03dc5ebd1b4c68f9
---
guix/scripts/time-machine.scm | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index bd64364fa2..2c30fe7cfd 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -179,21 +179,22 @@ to %OLDEST-POSSIBLE-COMMIT is not that of an ancestor."
(ref (assoc-ref opts 'ref))
(substitutes? (assoc-ref opts 'substitutes?))
(authenticate? (assoc-ref opts 'authenticate-channels?)))
- (when command-line
- (let* ((directory
- (with-store store
- (with-status-verbosity (assoc-ref opts 'verbosity)
- (with-build-handler (build-notifier #:use-substitutes?
- substitutes?
- #:verbosity
- (assoc-ref opts
'verbosity)
- #:dry-run? #f)
- (set-build-options-from-command-line store opts)
- (cached-channel-instance store channels
- #:authenticate? authenticate?
- #:reference-channels
- %reference-channels
- #:validate-channels
- validate-guix-channel)))))
- (executable (string-append directory "/bin/guix")))
- (apply execl (cons* executable executable command-line))))))))
+ (if command-line
+ (let* ((directory
+ (with-store store
+ (with-status-verbosity (assoc-ref opts 'verbosity)
+ (with-build-handler (build-notifier #:use-substitutes?
+ substitutes?
+ #:verbosity
+ (assoc-ref opts
'verbosity)
+ #:dry-run? #f)
+ (set-build-options-from-command-line store opts)
+ (cached-channel-instance store channels
+ #:authenticate? authenticate?
+ #:reference-channels
+ %reference-channels
+ #:validate-channels
+ validate-guix-channel)))))
+ (executable (string-append directory "/bin/guix")))
+ (apply execl (cons* executable executable command-line)))
+ (warning (G_ "no command specified; nothing to do~%")))))))
- branch master updated (286639c9af -> 08d94fe20e), guix-commits, 2023/11/05
- 04/06: time-machine: Make target commit check cheaper., guix-commits, 2023/11/05
- 03/06: tests: Make ‘guix time-machine’ test effective., guix-commits, 2023/11/05
- 01/06: tests: Honor system and target when lowering <system-test>., guix-commits, 2023/11/05
- 02/06: tests: inetd: Avoid race condition when looking for PID file., guix-commits, 2023/11/05
- 06/06: home: services: Add 'x11-display' service., guix-commits, 2023/11/05
- 05/06: time-machine: Warn when no command is given.,
guix-commits <=