]> git.eshelyaron.com Git - emacs.git/commitdiff
Protect against errors during package install
authorDavid Leatherman <git@david.leatherman.fm>
Tue, 23 May 2017 01:23:26 +0000 (18:23 -0700)
committerDavid Leatherman <git@david.leatherman.fm>
Tue, 23 May 2017 01:23:26 +0000 (18:23 -0700)
If the network is missing and there is a new use-package with :ensure,
startup would fail part of the way through due package.el being unable
to reach the package repo.  This will catch that error and report it
while allowing startup to continue.

Copyright-paperwork-exempt: yes

lisp/use-package/use-package.el

index b6fecb9fe33be23801d384bc2ca7478199055eac..066a365deb572137e8e76ddc7855dfe1ca4b4d19 100644 (file)
@@ -726,7 +726,7 @@ If the package is installed, its entry is removed from
                 ;; bypassed.
                 (member context '(:byte-compile :ensure :config))
                 (y-or-n-p (format "Install package %S?" package))))
-          (progn
+          (with-demoted-errors (format "Cannot load %s: %%S" name)
             (when (assoc package (bound-and-true-p package-pinned-packages))
               (package-read-all-archive-contents))
             (if (assoc package package-archive-contents)