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

Install packages > Search errors if search term has a trailing backslash

Open alexjulien opened this issue 8 years ago • 3 comments

Description

atom_find_crash

While searching for a package to install, I accidentally added a trailing backslash to the search terms. When pressing ENTER, I got this error message.

[31mSearching packages failed: Application error[39m

Steps to Reproduce

  1. Open Settings > Install packages
  2. Type some search terms
  3. Insert a backslash (\) at the end of the search terms and hit enter.

Expected behavior:

Get search results.

Actual behavior:

Got the error message. The search aborts.

Reproduces how often:

Every time.

Versions

Atom : 1.13.0 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

apm 1.14.1 npm 3.10.5 node 4.4.5 python 3.5.2 git visual studio 2015

Microsoft Windows [Versión 10.0.10240]

Additional Information

Ending the query with backslash + trailing space results in error, too. But a backslash elsewhere does no damage.

alexjulien avatar Jan 23 '17 20:01 alexjulien

I just tried to replicate the bug on my Mac, but here it doesn't happen.

Atom : 1.13.0 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

apm 1.14.1 npm 3.10.5 node 4.4.5 python 3.5.2 git 2.5.4

OS X 10.10.15

alexjulien avatar Jan 23 '17 22:01 alexjulien

Basically when you search it shells out to the apm command line too. The Windows command line has a bunch of escaping and special characters that neither node nor atom are escaping. That includes \ ^ & %% etc. " is also going to probably cause an issue in search.

On Mon, Jan 23, 2017 at 2:04 PM Alex Julien [email protected] wrote:

I just tried to replicate the bug on my Mac, but here it doesn't happen.

Atom : 1.13.0 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

apm 1.14.1 npm 3.10.5 node 4.4.5 python 3.5.2

git 2.5.4

OS X 10.10.15

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atom/settings-view/issues/906#issuecomment-274632320, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHQp4KJE_sqWmBpIE9kjpE_kKK9YCJzks5rVSP_gaJpZM4Lrh7k .

damieng avatar Jan 23 '17 22:01 damieng

I see. Some escaping/character removing would be in order.

alexjulien avatar Feb 03 '17 19:02 alexjulien