formulary: strengthen commit URL warning.
Inspired by https://github.com/Homebrew/brew/issues/7154
This commit is contained in:
parent
c88d07eb5a
commit
dbbf824393
@ -205,10 +205,11 @@ module Formulary
|
|||||||
def load_file
|
def load_file
|
||||||
if url =~ %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(/Formula)?/([\w+-.@]+).rb}
|
if url =~ %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(/Formula)?/([\w+-.@]+).rb}
|
||||||
formula_name = Regexp.last_match(2)
|
formula_name = Regexp.last_match(2)
|
||||||
ohai "Consider using `brew extract #{formula_name} ...`!"
|
opoo <<~EOS
|
||||||
puts <<~EOS
|
Unsupported installation from an commit URL!
|
||||||
|
Consider using `brew extract #{formula_name} ...` instead!"
|
||||||
This will extract your desired #{formula_name} version to a stable tap instead of
|
This will extract your desired #{formula_name} version to a stable tap instead of
|
||||||
installing from an unstable URL!
|
installing from a commit URL that cannnot receive updates or fixes!
|
||||||
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user