diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 8dd1ceb6a..2fd558a5c 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -93,6 +93,8 @@ module Homebrew when %r{^/(.*)/$} then Regexp.new($1) else /.*#{Regexp.escape(query)}.*/i end + rescue RegexpError + odie "#{query} is not a valid regex" end def search_taps(rx) |
