mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-01-03 07:42:17 -08:00
fix(cli): upgrade: don't 'doom sync' if aborted
There are some cases where the upgrade process will abort (due to failure or user input), and it then runs `doom sync` anyway. Don't do that. Fix: #8595
This commit is contained in:
parent
b6eef6941b
commit
e69d417c5f
1 changed files with 6 additions and 10 deletions
|
|
@ -32,11 +32,7 @@ libraries. It is the equivalent of the following shell commands:
|
|||
$ cd ~/.emacs.d
|
||||
$ git pull --rebase
|
||||
$ doom sync -u"
|
||||
(let* ((force? (doom-cli-context-suppress-prompts-p context))
|
||||
(sync-cmd (append '("sync" "-u")
|
||||
(if aot? '("--aot"))
|
||||
(if nobuild? '("-B"))
|
||||
(if jobs `("-j" ,jobs)))))
|
||||
(let ((force? (doom-cli-context-suppress-prompts-p context)))
|
||||
(cond
|
||||
(packages?
|
||||
;; HACK It's messy to use straight to upgrade straight, due to the
|
||||
|
|
@ -50,7 +46,10 @@ libraries. It is the equivalent of the following shell commands:
|
|||
(print! (item "Preparing straight for an update"))
|
||||
(delete-directory (doom-path straight-base-dir "straight/repos/straight.el")
|
||||
'recursive)))
|
||||
(call! sync-cmd)
|
||||
(call! (append '("sync" "-u")
|
||||
(if aot? '("--aot"))
|
||||
(if nobuild? '("-B"))
|
||||
(if jobs `("-j" ,jobs))))
|
||||
(print! (success "Finished upgrading Doom Emacs")))
|
||||
|
||||
((doom-cli-upgrade context force? force?)
|
||||
|
|
@ -62,10 +61,7 @@ libraries. It is the equivalent of the following shell commands:
|
|||
(if aot? "--aot")
|
||||
(if nobuild? "-B")
|
||||
(if force? "--force")
|
||||
(if jobs (format "--jobs=%d" jobs))))
|
||||
|
||||
((print! "Doom is up-to-date!")
|
||||
(call! sync-cmd)))))
|
||||
(if jobs (format "--jobs=%d" jobs)))))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue