Fix double package-refresh on first install

This commit is contained in:
Henrik Lissner 2017-06-06 12:01:10 +02:00
parent 7005ae13d7
commit a2f14183a1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 7 additions and 2 deletions

View file

@ -74,6 +74,8 @@ missing) and shouldn't be deleted.")
"A backup of `load-path' before it was altered by `doom-initialize'. Used as a
base by `doom!' and for calculating how many packages exist.")
(defvar doom--refresh-p nil)
(setq load-prefer-newer noninteractive
package--init-file-ensured t
package-user-dir (expand-file-name "elpa" doom-packages-dir)
@ -148,7 +150,8 @@ to speed up startup."
;; Ensure core packages are installed
(let ((core-packages (cl-remove-if #'package-installed-p doom-core-packages)))
(when core-packages
(package-refresh-contents)
(package-refresh-contents t)
(setq doom--refresh-p t)
(dolist (pkg core-packages)
(let ((inhibit-message t))
(package-install pkg))