-
-
Notifications
You must be signed in to change notification settings - Fork 45
A minor problem in tools/install-packages.el #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you run into this issue? Usually the code is called via emacs -batch, so without init file. In that case Feel free to open a PR, just make sure to add |
@fapdash Yes, I actually got into the problem. Initially, I also thought that package-archive-contents should be nil if the code is run via emacs -batch. I even tried adding "-q" to the emacs commandline option. It seems that Emacs always getting the archived contents from ~/.emacs.d, at least, on my machine (Debian Linux 12). I have added (require 'cl-extra) to the code. I will submit the PR shortly. |
Fixed via #470, closing |
It seems that the function
exercism//install-required-packages
intools/install-packages.el
assumes that if the variablepackage-archive-contents
is not nil, the variablepackage-archives
contains the gnu and melpa site information. This assumption does not hold in general.For example, an emacs user has run
(package-refresh-contents)
without explicitly settingpackage-archives
. In this case,package-archives
contains the "gnu" and "nongnu" sites but not the "melpa" site, so thatpackage-archive-contents
is filled with the information downloaded from the "gnu" and "nongnu" sites. But two among the three required packages, mustache and string-inflection, are only avialble at the melpa site. So, runningexercism//install-required-packages
will result in an error message, not being able to install mustache or string-inflection, unless both of them have been already installed.The problem can be fixed easily. Intead of checking if
package-archive-contents
is nil, we can directly check if the three required packages have been installed. The resulting code loos like:Does this look OK? If so, shall I submit a PR?
The text was updated successfully, but these errors were encountered: