Make tarball extension regex explicit
This commit is contained in:
parent
26821301e7
commit
8940d198fe
@ -76,7 +76,12 @@ module Homebrew
|
|||||||
HTTP_HEAD_BODY_SEPARATOR = "\r\n\r\n"
|
HTTP_HEAD_BODY_SEPARATOR = "\r\n\r\n"
|
||||||
|
|
||||||
# A regex used to identify a tarball extension at the end of a string.
|
# A regex used to identify a tarball extension at the end of a string.
|
||||||
TARBALL_EXTENSION_REGEX = /\.t(?:ar\..+|[a-z0-9]+)$/i.freeze
|
TARBALL_EXTENSION_REGEX = /
|
||||||
|
\.t
|
||||||
|
(?:ar(?:\.(?:bz2|gz|lz|lzma|lzo|xz|Z|zst))?|
|
||||||
|
b2|bz2?|z2|az|gz|lz|lzma|xz|Z|aZ|zst)
|
||||||
|
$
|
||||||
|
/ix.freeze
|
||||||
|
|
||||||
# An error message to use when a `strategy` block returns a value of
|
# An error message to use when a `strategy` block returns a value of
|
||||||
# an inappropriate type.
|
# an inappropriate type.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user