settings-view
settings-view copied to clipboard
The install button is shown for installed packages in safe mode
Prerequisites
- [X] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
In safe mode the install button is shown for installed packages. This behavior changed recently.
Image from Atom 1.16.0-beta0
Image from Atom 1.13.1
Steps to Reproduce
- Open Atom in safe mode from
cmd.exe
usingatom --safe
- Open the
settings-view
- Navigate to the Packages tab
- Check the Package Card for the Community packages
Expected behavior: Disable and install buttons to show up like before. Or not install button because the packages are already installed.
Actual behavior: Install button is visible.
Reproduces how often: 100%
Versions
1.16.0-beta0 x64 Windows 10
Additional Information
/cc: @as-cii We discussed this in Slack as a potential jQuery removal issue but it changed before that.
I am unable to reproduce this on my machine. Maybe it's an issue just on Windows? Could have it been caused by https://github.com/atom/settings-view/pull/894?
https://github.com/atom/settings-view/pull/894 is the most suspicious change between the releases where this changed. For me running atom.packages.getAvailablePackageNames()
in the developer tools console only returns core packages in safe mode and all packages outside of safe mode.
I was able to reproduce this on Ubuntu 1.22.0-dev-1880e14 running on --safe
I'll attempt to find the cause and make a pr if I find a solution
Yep, the array returned by atom.packages.getAvailablePackageNames()
does not return community packages in safe mode.
However, this package uses apm
to get the list of all packages on the computer, so community packages appear in the cards regardless of any modes.
Because the package is thought to exist but not declared as active, it is given the install
button.