Skip to content
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

infinite loop when searching for notepad++ #634

Closed
saildata opened this issue Jan 14, 2016 · 1 comment
Closed

infinite loop when searching for notepad++ #634

saildata opened this issue Jan 14, 2016 · 1 comment

Comments

@saildata
Copy link
Contributor

parsing "notepad++" - Nested quantifier +.
At scoop\apps\scoop\current\libexec\scoop-search.ps1:22 char:12
+         if($alias -match $query) { return $alias }
+            ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], ArgumentException

You can also invoke the loop with scoop search ++ for obvious reasons but oddly not s search --

It looks like the -match operator is used in several user commands in scoop

Maybe a edge case since npp is literally the only returned app with plus in the name. The standard CTRL + c (lowercase only) issues a break signal in case someone blindly types this in...

@lukesampson
Copy link
Member

I could have escaped the search term, but I think it's kind of cool if people can use regex to search. So instead I decided to pre-parse the regular expression and show one error, rather than have an error each time it searches an app's name.

$ scoop search notepad++
invalid regular expression: parsing "notepad++" - Nested quantifier +.
$ scoop search notepad\+\+
extras bucket:
  notepadplusplus (6.6.9) --> includes 'notepad++.exe'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants