Bitbucket: Anchor start of regex with protocol

This commit is contained in:
Sam Ford 2020-12-20 16:00:08 -05:00
parent cbbc932c21
commit 21b1888388
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -30,7 +30,7 @@ module Homebrew
class Bitbucket
# The `Regexp` used to determine if the strategy applies to the URL.
URL_MATCH_REGEX = %r{
bitbucket\.org/
^https?://bitbucket\.org/
(?<path>.+?)/ # The path leading up to the get or downloads part
(?<dl_type>get|downloads)/ # An indicator of the file download type
(?<prefix>(?:[^/]+?[_-])?) # Filename text before the version