From e69d417c5f77ff7befb0fa1ebfda12451a5f3f81 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 13 Dec 2025 17:04:31 -0500 Subject: [PATCH] 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 --- lisp/cli/upgrade.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/cli/upgrade.el b/lisp/cli/upgrade.el index 88141a553..68de49286 100644 --- a/lisp/cli/upgrade.el +++ b/lisp/cli/upgrade.el @@ -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))))))) ;;