Change how doom core reloads itself after 'doom upgrade'
Hopefully to address weird void-function errors while upgrading.
This commit is contained in:
parent
f1707e48db
commit
204783a96e
1 changed files with 5 additions and 9 deletions
|
@ -106,25 +106,21 @@ following shell commands:
|
||||||
(print! (start "Upgrading Doom Emacs..."))
|
(print! (start "Upgrading Doom Emacs..."))
|
||||||
(print-group!
|
(print-group!
|
||||||
(doom-clean-byte-compiled-files)
|
(doom-clean-byte-compiled-files)
|
||||||
(if (and (zerop (car (doom-call-process "git" "reset" "--hard" target-remote)))
|
(unless (and (zerop (car (doom-call-process "git" "reset" "--hard" target-remote)))
|
||||||
(equal (vc-git--rev-parse "HEAD") new-rev))
|
(equal (vc-git--rev-parse "HEAD") new-rev))
|
||||||
(print! (info "%s") (cdr result))
|
|
||||||
(error "Failed to check out %s" (substring new-rev 0 10)))
|
(error "Failed to check out %s" (substring new-rev 0 10)))
|
||||||
|
(print! (info "%s") (cdr result))
|
||||||
|
|
||||||
;; Reload Doom's CLI & libraries, in case there were any
|
;; Reload Doom's CLI & libraries, in case there were any
|
||||||
;; upstream changes. Major changes will still break, however
|
;; upstream changes. Major changes will still break, however
|
||||||
(condition-case-unless-debug e
|
(condition-case-unless-debug e
|
||||||
(progn
|
(progn
|
||||||
(mapc (doom-rpartial #'unload-feature t)
|
(mapc (lambda (f) (load (symbol-name f)))
|
||||||
'(core core-lib
|
'(core core-lib
|
||||||
core-cli
|
core-cli
|
||||||
core-modules
|
core-modules
|
||||||
core-packages))
|
core-packages))
|
||||||
(require 'core)
|
(doom-initialize 'force))
|
||||||
(require 'core-cli)
|
|
||||||
(setq doom-init-p nil
|
|
||||||
doom-init-modules-p nil)
|
|
||||||
(doom-initialize))
|
|
||||||
(error
|
(error
|
||||||
(signal 'doom-error (list "Could not upgrade Doom without issues"
|
(signal 'doom-error (list "Could not upgrade Doom without issues"
|
||||||
e))))
|
e))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue