Stop file ext detection at query param boundaries

This commit improves Homebrew’s extension detector in `cask/lib/hbc/download_strategy.rb` a bit
so that it won’t cross individual URL query param boundaries any
longer:

```
def ext
  Pathname.new(@url).extname[/[^?&]+/]
end
```
This commit is contained in:
Claudia 2018-03-13 16:41:47 +01:00
parent ba830df4e6
commit 656986153b

View File

@ -154,7 +154,7 @@ module Hbc
end
def ext
Pathname.new(@url).extname[/[^?]+/]
Pathname.new(@url).extname[/[^?&]+/]
end
end