Made -f the default for 'doom refresh' #2065
-f is necessary when there are changes to your system that Doom needs to pick up when running 'doom refresh'. It won't do anything if your doom dotfiles haven't visibly changed, which won't be the case if you are installing, say, mu4e or vterm, through your system package manager. What was initially a time-saving mechanic has become a trap for beginners, so I've made -f its default behavior and its previous behavior opt-in with the -n / --if-necessary switches.
This commit is contained in:
parent
32089d9acb
commit
c363791da0
3 changed files with 12 additions and 10 deletions
|
@ -216,7 +216,7 @@ BODY will be run when this dispatcher is called."
|
|||
(load! "cli/install")
|
||||
|
||||
(defcli! (refresh re)
|
||||
((force-p ["-f" "--force"] "Regenerate autoloads files, whether or not they're stale"))
|
||||
((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary"))
|
||||
"Ensure Doom is properly set up.
|
||||
|
||||
This is the equivalent of running autoremove, install, autoloads, then
|
||||
|
@ -234,7 +234,7 @@ stale."
|
|||
(let (success)
|
||||
(when (file-exists-p doom-env-file)
|
||||
(doom-cli-reload-env-file 'force))
|
||||
(doom-cli-reload-core-autoloads force-p)
|
||||
(doom-cli-reload-core-autoloads (not if-necessary-p))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(and (doom-cli-packages-install)
|
||||
|
@ -243,7 +243,7 @@ stale."
|
|||
(setq success t))
|
||||
(and (doom-cli-packages-purge nil 'builds-p nil)
|
||||
(setq success t)))
|
||||
(doom-cli-reload-package-autoloads (or success force-p))
|
||||
(doom-cli-reload-package-autoloads (or success (not if-necessary-p)))
|
||||
(doom-cli-byte-compile nil 'recompile))
|
||||
t))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue