wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.79k stars 814 forks source link

[3.4.0-rc3] `Package Control: Install Package` installs a plugin even if there is no candidate #1504

Closed jfcherng closed 2 years ago

jfcherng commented 3 years ago

Environment

Steps

  1. Execute Package Control: Install Package
  2. Enter a non-existing package such as aaaaaaaaaaaaaaaaaa (there will be no candidate shown in the quick panel)
  3. Press Enter
  4. A whatever package will be installed

Expected Behavior

Given that there is no candidate listed in the quick panel, no plugin should be installed.

Video Recording

https://streamable.com/crwp5t

jfcherng commented 3 years ago

Turns out to be show_quick_panel bug in ST.

jfcherng commented 2 years ago

So I think now the staff means that this should be fixed in PC side.

rchl commented 2 years ago

What does actually happen in PC?

If the issue would be as described in the linked issue then it would also trigger on pressing escape. I don't think it does so what's the deal?

PC returns on getting a -1 value: https://github.com/wbond/package_control/blob/cfaaeb57612023e3679ecb7f8cd7ceac9f57990d/package_control/package_installer.py#L160-L171

jfcherng commented 2 years ago

It looks like this has been fixed silently. 👍

rchl commented 2 years ago

That code is from 2013.

I think there was actually another core issue that made the index not have a -1 value. You can see that developers have fixed stuff in that core issue.