Warn when :ensure t is used
When package.el isn't initialized.
This commit is contained in:
parent
9ac9deb0fd
commit
6e702a435a
1 changed files with 3 additions and 1 deletions
|
@ -330,7 +330,9 @@ This value is cached. If REFRESH-P, then don't use the cached value."
|
|||
;; packages with package.el, by copying over old `use-package' declarations with
|
||||
;; an :ensure t property. Doom doesn't use package.el, so this will throw an
|
||||
;; error that will confuse beginners, so we disable `:ensure'.
|
||||
(setq use-package-ensure-function #'ignore)
|
||||
(setq use-package-ensure-function
|
||||
(lambda (name &rest _)
|
||||
(message "Ignoring ':ensure t' in '%s' config" name)))
|
||||
;; ...On the other hand, if the user has loaded `package', then we should assume
|
||||
;; they know what they're doing and restore the old behavior:
|
||||
(add-transient-hook! 'package-initialize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue