aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-03-18 17:02:08 +0200
committerMike McQuaid2017-03-20 18:20:31 +0200
commit80e95b684e7485b5c5b7f7209dd95b0bdc9e3406 (patch)
tree421290914f160363cf4333477eee6b3efbdfc982 /Library/Homebrew/cmd
parent623c95b3f8660d5c77936483ec9b9a4db16aff00 (diff)
downloadbrew-80e95b684e7485b5c5b7f7209dd95b0bdc9e3406.tar.bz2
blacklist: move to missing_formula class instead.
This will allow extending this class so it can be used by more than just blacklisting.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/info.rb8
-rw-r--r--Library/Homebrew/cmd/install.rb6
-rw-r--r--Library/Homebrew/cmd/search.rb4
3 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 2d5e34ce2..5c96e5c50 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -16,7 +16,7 @@
#: See the docs for examples of using the JSON output:
#: <http://docs.brew.sh/Querying-Brew.html>
-require "blacklist"
+require "missing_formula"
require "caveats"
require "options"
require "formula"
@@ -56,9 +56,9 @@ module Homebrew
info_formula Formulary.find_with_priority(f)
end
rescue FormulaUnavailableError => e
- # No formula with this name, try a blacklist lookup
- if (blacklist = blacklisted?(f))
- ofail "#{e.message}\n#{blacklist}"
+ # No formula with this name, try a missing formula lookup
+ if (missing_formula = Homebrew::MissingFormula.missing_formula(f))
+ ofail "#{e.message}\n#{missing_formula}"
else
ofail e.message
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 8a99bd397..a0f95887b 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -55,7 +55,7 @@
#: If `--git` is passed, Homebrew will create a Git repository, useful for
#: creating patches to the software.
-require "blacklist"
+require "missing_formula"
require "diagnostic"
require "cmd/search"
require "formula_installer"
@@ -207,8 +207,8 @@ module Homebrew
# formula was found, but there's a problem with its implementation).
ofail e.message
rescue FormulaUnavailableError => e
- if (blacklist = blacklisted?(e.name))
- ofail "#{e.message}\n#{blacklist}"
+ if (missing_formula = Homebrew::MissingFormula.missing_formula(e.name))
+ ofail "#{e.message}\n#{missing_formula}"
elsif e.name == "updog"
ofail "What's updog?"
else
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index 4c8bbc77c..6887805d6 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -14,7 +14,7 @@
#: Search for <text> in the given package manager's list.
require "formula"
-require "blacklist"
+require "missing_formula"
require "utils"
require "thread"
require "official_taps"
@@ -67,7 +67,7 @@ module Homebrew
if $stdout.tty?
count = local_results.length + tap_results.length
- if msg = blacklisted?(query)
+ if msg = Homebrew::MissingFormula.missing_formula(query)
if count > 0
puts
puts "If you meant #{query.inspect} specifically:"