Rename lvar
This commit is contained in:
parent
1c411f6086
commit
ccfc1be6fe
@ -500,10 +500,11 @@ module Formulary
|
|||||||
|
|
||||||
def load_file(flags:, ignore_errors:)
|
def load_file(flags:, ignore_errors:)
|
||||||
if @from != :formula_installer
|
if @from != :formula_installer
|
||||||
if (md = url.match(%r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<name>[\w+-.@]+).rb}))
|
match = url.match(%r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<name>[\w+-.@]+).rb})
|
||||||
|
if match
|
||||||
raise UnsupportedInstallationMethod,
|
raise UnsupportedInstallationMethod,
|
||||||
"Installation of #{md[:name]} from a GitHub commit URL is unsupported! " \
|
"Installation of #{match[:name]} from a GitHub commit URL is unsupported! " \
|
||||||
"`brew extract #{md[:name]}` to a stable tap on GitHub instead."
|
"`brew extract #{match[:name]}` to a stable tap on GitHub instead."
|
||||||
elsif url.match?(%r{^(https?|ftp)://})
|
elsif url.match?(%r{^(https?|ftp)://})
|
||||||
raise UnsupportedInstallationMethod,
|
raise UnsupportedInstallationMethod,
|
||||||
"Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \
|
"Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user