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
This commit is contained in:
parent
0ce8e868b9
commit
70550acf88
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue