formulary: recommend brew extract.
This will provide a better experience to users rather than a URL that will likely break in future.
This commit is contained in:
parent
4141c1bfa0
commit
d7bc5835b9
@ -195,6 +195,15 @@ module Formulary
|
||||
end
|
||||
|
||||
def load_file
|
||||
if url =~ %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(/Formula)?/([\w+-.@]+).rb}
|
||||
formula_name = Regexp.last_match(2)
|
||||
ohai "Consider using `brew extract #{formula_name} ...`!"
|
||||
puts <<~EOS
|
||||
This will extract your desired #{formula_name} version to a stable tap instead of
|
||||
installing from an unstable URL!
|
||||
|
||||
EOS
|
||||
end
|
||||
HOMEBREW_CACHE_FORMULA.mkpath
|
||||
FileUtils.rm_f(path)
|
||||
curl_download url, to: path
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user