Fix package manager ignoring :disable
This commit is contained in:
parent
125561eb03
commit
ebc30232a3
|
@ -229,25 +229,24 @@ necessary package metadata is initialized and available for them."
|
||||||
(with-plist! (cdr package) (recipe module disable ignore pin)
|
(with-plist! (cdr package) (recipe module disable ignore pin)
|
||||||
(if ignore
|
(if ignore
|
||||||
(doom-log "Ignoring package %S" name)
|
(doom-log "Ignoring package %S" name)
|
||||||
(when disable
|
|
||||||
(doom-log "Disabling package %S" name)
|
|
||||||
(cl-pushnew name doom-disabled-packages))
|
|
||||||
(when pin
|
(when pin
|
||||||
(doom-log "Pinning package %S to %S" name pin)
|
(doom-log "Pinning package %S to %S" name pin)
|
||||||
(setf (alist-get (symbol-name name) doom-pinned-packages
|
(setf (alist-get (symbol-name name) doom-pinned-packages
|
||||||
nil nil #'equal)
|
nil nil #'equal)
|
||||||
pin))
|
pin))
|
||||||
;; Warn about disabled core packages
|
(if (not disable)
|
||||||
(when (and (not (memq name doom-disabled-packages))
|
(with-demoted-errors "Package error: %s"
|
||||||
(cl-find :core module :key #'car))
|
(when recipe
|
||||||
(print! (warn "%s\n%s")
|
(straight-override-recipe (cons name recipe)))
|
||||||
(format "You've disabled %S" name)
|
(straight-register-package name))
|
||||||
(indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n"
|
(doom-log "Disabling package %S" name)
|
||||||
"core packages are always available. Disable their minor-modes or hooks instead."))))
|
(cl-pushnew name doom-disabled-packages)
|
||||||
(with-demoted-errors "Package error: %s"
|
;; Warn about disabled core packages
|
||||||
(when recipe
|
(when (cl-find :core module :key #'car)
|
||||||
(straight-override-recipe (cons name recipe)))
|
(print! (warn "%s\n%s")
|
||||||
(straight-register-package name))))))
|
(format "You've disabled %S" name)
|
||||||
|
(indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n"
|
||||||
|
"core packages are always available. Disable their minor-modes or hooks instead.")))))))))
|
||||||
(unless doom-interactive-mode
|
(unless doom-interactive-mode
|
||||||
(add-hook 'kill-emacs-hook #'doom--finalize-straight))))
|
(add-hook 'kill-emacs-hook #'doom--finalize-straight))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user