diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 0e2de5ea60..307e8e2b50 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -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