settings-view icon indicating copy to clipboard operation
settings-view copied to clipboard

The install button is shown for installed packages in safe mode

Open Ben3eeE opened this issue 7 years ago • 4 comments

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

Image from Atom 1.13.1 image

Steps to Reproduce

  1. Open Atom in safe mode from cmd.exe using atom --safe
  2. Open the settings-view
  3. Navigate to the Packages tab
  4. 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.

Ben3eeE avatar Mar 16 '17 18:03 Ben3eeE

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?

as-cii avatar Mar 17 '17 14:03 as-cii

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.

Ben3eeE avatar Mar 17 '17 14:03 Ben3eeE

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

jlvivero avatar Sep 27 '17 04:09 jlvivero

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.

Aerijo avatar Aug 02 '18 09:08 Aerijo