cli: don't repeat "Executing..." line on restart

This commit is contained in:
Henrik Lissner 2021-05-24 17:32:46 -04:00
parent 7ec9221957
commit df3c221c73
2 changed files with 10 additions and 9 deletions

View file

@ -132,14 +132,15 @@ Environment variables:
(doom-cli-execute "help")
(let ((start-time (current-time)))
(run-hooks 'doom-cli-pre-hook)
(print! (start "Executing 'doom %s' %s")
(string-join
(cons (or (ignore-errors
(doom-cli-name (doom-cli-get command)))
command)
args)
" ")
(format-time-string "%Y-%m-%d %H:%M:%S"))
(unless (getenv "__DOOMRESTART")
(print! (start "Executing 'doom %s' %s")
(string-join
(cons (or (ignore-errors
(doom-cli-name (doom-cli-get command)))
command)
args)
" ")
(format-time-string "%Y-%m-%d %H:%M:%S")))
(print-group!
(when-let (result (apply #'doom-cli-execute command args))
(run-hooks 'doom-cli-post-hook)

View file

@ -77,7 +77,7 @@ byte-compiled from.")
(with-temp-file cache)
(if doom-interactive-p t
(message "Restarting..." )
(throw 'exit "__NOTANGLE=1 $@"))))))
(throw 'exit "__DOOMRESTART=1 __NOTANGLE=1 $@"))))))
;;;###autoload
(defalias '+literate/reload #'doom/reload)