mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
This commit is contained in:
parent
ab13e2be69
commit
331d858e21
1 changed files with 19 additions and 18 deletions
|
@ -179,21 +179,22 @@ (define-command (guix-time-machine . args)
|
||||||
(ref (assoc-ref opts 'ref))
|
(ref (assoc-ref opts 'ref))
|
||||||
(substitutes? (assoc-ref opts 'substitutes?))
|
(substitutes? (assoc-ref opts 'substitutes?))
|
||||||
(authenticate? (assoc-ref opts 'authenticate-channels?)))
|
(authenticate? (assoc-ref opts 'authenticate-channels?)))
|
||||||
(when command-line
|
(if command-line
|
||||||
(let* ((directory
|
(let* ((directory
|
||||||
(with-store store
|
(with-store store
|
||||||
(with-status-verbosity (assoc-ref opts 'verbosity)
|
(with-status-verbosity (assoc-ref opts 'verbosity)
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
substitutes?
|
substitutes?
|
||||||
#:verbosity
|
#:verbosity
|
||||||
(assoc-ref opts 'verbosity)
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run? #f)
|
#:dry-run? #f)
|
||||||
(set-build-options-from-command-line store opts)
|
(set-build-options-from-command-line store opts)
|
||||||
(cached-channel-instance store channels
|
(cached-channel-instance store channels
|
||||||
#:authenticate? authenticate?
|
#:authenticate? authenticate?
|
||||||
#:reference-channels
|
#:reference-channels
|
||||||
%reference-channels
|
%reference-channels
|
||||||
#:validate-channels
|
#:validate-channels
|
||||||
validate-guix-channel)))))
|
validate-guix-channel)))))
|
||||||
(executable (string-append directory "/bin/guix")))
|
(executable (string-append directory "/bin/guix")))
|
||||||
(apply execl (cons* executable executable command-line))))))))
|
(apply execl (cons* executable executable command-line)))
|
||||||
|
(warning (G_ "no command specified; nothing to do~%")))))))
|
||||||
|
|
Loading…
Reference in a new issue