fix(cli): doom sync: suppress rebuild prompt when upgrading
12a765c
introduced suppression of package-rebuilding prompts on 'doom upgrade', but inadvertently reversed the check. This fixes that (and refactors the if/or tree into a `cond`). Amend:12a765c509
This commit is contained in:
parent
aef2b12100
commit
201051c368
1 changed files with 8 additions and 7 deletions
|
@ -74,13 +74,14 @@ OPTIONS:
|
||||||
(print! (warn "Your system has changed since last sync"))
|
(print! (warn "Your system has changed since last sync"))
|
||||||
(setq to-rebuild t))
|
(setq to-rebuild t))
|
||||||
(when (and to-rebuild (not (doom-cli-context-suppress-prompts-p context)))
|
(when (and to-rebuild (not (doom-cli-context-suppress-prompts-p context)))
|
||||||
(if nobuild?
|
(cond (nobuild?
|
||||||
(print! (warn "Packages need to be recompiled, but -B has prevented it. Skipping..."))
|
(print! (warn "Packages must be rebuilt, but -B has prevented it. Skipping...")))
|
||||||
(or (not (doom-cli-context-get context 'upgrading))
|
((doom-cli-context-get context 'upgrading)
|
||||||
(y-or-n-p
|
(print! (warn "Packages will be rebuilt"))
|
||||||
(format! " %s" "Your installed packages will need to be recompiled. Do so now?"))
|
(setq rebuild? t))
|
||||||
(exit! 0))
|
((y-or-n-p (format! " %s" "Installed packages must be rebuilt. Do so now?"))
|
||||||
(setq rebuild? t))))
|
(setq rebuild? t))
|
||||||
|
((exit! 0)))))
|
||||||
(when (and (not noenvvar?)
|
(when (and (not noenvvar?)
|
||||||
(file-exists-p doom-env-file))
|
(file-exists-p doom-env-file))
|
||||||
(call! '(env)))
|
(call! '(env)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue