install: refactoring blacklist check
Closes Homebrew/homebrew#37590. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
c19c355226
commit
b136a0acdf
@ -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,14 +82,18 @@ module Homebrew
|
||||
|
||||
formulae.each { |f| install_formula(f) }
|
||||
rescue FormulaUnavailableError => e
|
||||
if (blacklist = blacklisted?(e.name))
|
||||
ofail "#{e.message}\n#{blacklist}"
|
||||
else
|
||||
ofail e.message
|
||||
query = query_regexp(e.name)
|
||||
puts 'Searching formulae...'
|
||||
puts "Searching formulae..."
|
||||
puts_columns(search_formulae(query))
|
||||
puts 'Searching taps...'
|
||||
puts "Searching taps..."
|
||||
puts_columns(search_taps(query))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def check_ppc
|
||||
case Hardware::CPU.type when :ppc, :dunno
|
||||
|
Loading…
x
Reference in New Issue
Block a user