Ensure package state is initialized before package management

This commit is contained in:
Henrik Lissner 2018-05-25 02:41:23 +02:00
parent ef9cea4d11
commit 0368e8f84b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -387,7 +387,7 @@ calls."
(defun doom//packages-install (&optional auto-accept-p) (defun doom//packages-install (&optional auto-accept-p)
"Interactive command for installing missing packages." "Interactive command for installing missing packages."
(interactive "P") (interactive "P")
(doom-initialize-packages) (doom-initialize-packages 'internal)
(print! "Looking for packages to install...") (print! "Looking for packages to install...")
(let ((packages (reverse (doom-get-missing-packages)))) (let ((packages (reverse (doom-get-missing-packages))))
(cond ((not packages) (cond ((not packages)
@ -442,7 +442,7 @@ calls."
(defun doom//packages-update (&optional auto-accept-p) (defun doom//packages-update (&optional auto-accept-p)
"Interactive command for updating packages." "Interactive command for updating packages."
(interactive "P") (interactive "P")
(doom-initialize-packages) (doom-initialize-packages 'internal)
(print! "Looking for outdated packages...") (print! "Looking for outdated packages...")
(doom-refresh-packages-maybe doom-debug-mode) (doom-refresh-packages-maybe doom-debug-mode)
(let ((packages (cl-sort (cl-copy-list (doom-get-outdated-packages)) #'string-lessp (let ((packages (cl-sort (cl-copy-list (doom-get-outdated-packages)) #'string-lessp
@ -486,7 +486,7 @@ calls."
(defun doom//packages-autoremove (&optional auto-accept-p) (defun doom//packages-autoremove (&optional auto-accept-p)
"Interactive command for auto-removing orphaned packages." "Interactive command for auto-removing orphaned packages."
(interactive "P") (interactive "P")
(doom-initialize-packages) (doom-initialize-packages 'internal)
(print! "Looking for orphaned packages...") (print! "Looking for orphaned packages...")
(let ((packages (doom-get-orphaned-packages))) (let ((packages (doom-get-orphaned-packages)))
(cond ((not packages) (cond ((not packages)