Skip to content
Snippets Groups Projects
Commit b136a0ac authored by Xu Cheng's avatar Xu Cheng
Browse files

install: refactoring blacklist check


Closes Homebrew/homebrew#37590.

Signed-off-by: default avatarXu Cheng <xucheng@me.com>
parent c19c3552
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,6 @@ module Homebrew
end
ARGV.named.each do |name|
# if a formula has been tapped ignore the blacklisting
unless Formula.path(name).file?
msg = blacklisted? name
raise "No available formula for #{name}\n#{msg}" if msg
end
if !File.exist?(name) && (name =~ HOMEBREW_TAP_FORMULA_REGEX \
|| name =~ HOMEBREW_CASK_TAP_FORMULA_REGEX)
install_tap $1, $2
......@@ -87,12 +82,16 @@ module Homebrew
formulae.each { |f| install_formula(f) }
rescue FormulaUnavailableError => e
ofail e.message
query = query_regexp(e.name)
puts 'Searching formulae...'
puts_columns(search_formulae(query))
puts 'Searching taps...'
puts_columns(search_taps(query))
if (blacklist = blacklisted?(e.name))
ofail "#{e.message}\n#{blacklist}"
else
ofail e.message
query = query_regexp(e.name)
puts "Searching formulae..."
puts_columns(search_formulae(query))
puts "Searching taps..."
puts_columns(search_taps(query))
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment