From aef2b12100d92b176bf6482826c03e5a7e6fe0ad Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Mar 2024 00:23:41 -0400 Subject: [PATCH] feat(cli): doom upgrade: add -B option To mirror doom sync's -B option. --- lisp/cli/upgrade.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/cli/upgrade.el b/lisp/cli/upgrade.el index d42017caa..acaf37a3d 100644 --- a/lisp/cli/upgrade.el +++ b/lisp/cli/upgrade.el @@ -21,6 +21,7 @@ (defcli! ((upgrade up)) ((packages? ("-p" "--packages") "Only upgrade packages, not Doom") (jobs ("-j" "--jobs" num) "How many CPUs to use for native compilation") + (nobuild? ("-B") "Don't rebuild packages when hostname or Emacs version has changed") &context context) "Updates Doom and packages. @@ -32,7 +33,9 @@ following shell commands: doom clean doom sync -u" (let* ((force? (doom-cli-context-suppress-prompts-p context)) - (sync-cmd (append '("sync" "-u") (if jobs `("-j" ,num))))) + (sync-cmd (append '("sync" "-u") + (if nobuild? '("-B")) + (if jobs `("-j" ,num))))) (cond (packages? ;; HACK It's messy to use straight to upgrade straight, due to the @@ -55,6 +58,7 @@ following shell commands: (print! (item "Reloading Doom Emacs")) (doom-cli-context-put context 'upgrading t) (exit! "doom" "upgrade" "-p" + (if nobuild? "-B") (if force? "--force") (if jobs (format "--jobs=%d" jobs))))