General, minor refactors in doom core
This commit is contained in:
parent
dadd54604b
commit
99fc55f75c
4 changed files with 65 additions and 70 deletions
|
@ -1,7 +1,7 @@
|
|||
;;; core/cli/upgrade.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defcli! (upgrade up)
|
||||
((force-p ["-f" "--force"] "Discard local changes to Doom and upgrade anyway")
|
||||
((force-p ["-f" "--force"] "Discard local changes to Doom and packages, and upgrade anyway")
|
||||
(packages-only-p ["-p" "--packages"] "Only upgrade packages, not Doom"))
|
||||
"Updates Doom and packages.
|
||||
|
||||
|
@ -14,16 +14,17 @@ following shell commands:
|
|||
bin/doom refresh
|
||||
bin/doom update"
|
||||
:bare t
|
||||
(if (delq
|
||||
nil (list
|
||||
(unless packages-only-p
|
||||
(doom-cli-upgrade doom-auto-accept force-p))
|
||||
(doom-cli-execute "refresh")
|
||||
(when (doom-cli-packages-update)
|
||||
(doom-cli-reload-package-autoloads)
|
||||
t)))
|
||||
(print! (success "Done! Restart Emacs for changes to take effect."))
|
||||
(print! "Nothing to do. Doom is up-to-date!")))
|
||||
(let ((doom-auto-discard force-p))
|
||||
(if (delq
|
||||
nil (list
|
||||
(unless packages-only-p
|
||||
(doom-cli-upgrade doom-auto-accept doom-auto-discard))
|
||||
(doom-cli-execute "refresh")
|
||||
(when (doom-cli-packages-update)
|
||||
(doom-cli-reload-package-autoloads)
|
||||
t)))
|
||||
(print! (success "Done! Restart Emacs for changes to take effect."))
|
||||
(print! "Nothing to do. Doom is up-to-date!"))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue