Commit 70550acf authored by Phil Hagelberg's avatar Phil Hagelberg Committed by Chong Yidong

Fix M-x package-install failure if no archive has been fetched yet.

* emacs-lisp/package.el (package-install): Run
package-refresh-contents if there is no archive yet.

Fixes: debbugs:97978
parent 0ce8e868
2012-01-28 Phil Hagelberg <phil@hagelb.org>
* emacs-lisp/package.el (package-install): Run
package-refresh-contents if there is no archive yet (Bug#97978).
2012-01-28 Chong Yidong <cyd@gnu.org>
* emacs-lisp/package.el (package-maybe-load-descriptor): New
......
......@@ -889,6 +889,8 @@ archive in `package-archives'. Interactively, prompt for NAME."
;; symbols for completion.
(unless package--initialized
(package-initialize t))
(unless package-archive-contents
(package-refresh-contents))
(list (intern (completing-read
"Install package: "
(mapcar (lambda (elt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment