aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-12-27 14:26:56 -0500
committerJack Nagel2014-12-27 14:26:56 -0500
commit0919a3868ff34cd8aa30c4f3c6d7dff5603e1a18 (patch)
tree2a1f3d5881b45cdf3bf1496dfae8dcbe85b660f2 /Library/Homebrew
parentf4e86e471eb47c1e35c9f3c8cb09540957f2eeee (diff)
downloadhomebrew-0919a3868ff34cd8aa30c4f3c6d7dff5603e1a18.tar.bz2
One less external call to #active_spec
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula.rb4
-rw-r--r--Library/Homebrew/formula_installer.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index cc25c2482..2f25a5c30 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -212,6 +212,10 @@ class Formula
active_spec.deprecated_options
end
+ def deprecated_flags
+ active_spec.deprecated_flags
+ end
+
# If a named option is defined for the currently active {SoftwareSpec}.
def option_defined?(name)
active_spec.option_defined?(name)
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 7cca75076..3515c66de 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -154,7 +154,7 @@ class FormulaInstaller
raise "Unrecognized architecture for --bottle-arch: #{arch}"
end
- formula.active_spec.deprecated_flags.each do |deprecated_option|
+ formula.deprecated_flags.each do |deprecated_option|
old_flag = deprecated_option.old_flag
new_flag = deprecated_option.current_flag
opoo "#{formula.name}: #{old_flag} was deprecated; using #{new_flag} instead!"