One less external call to #active_spec

This commit is contained in:
Jack Nagel 2014-12-27 14:26:56 -05:00
parent b43876d4a2
commit 77a1c6f166
2 changed files with 5 additions and 1 deletions

View File

@ -212,6 +212,10 @@ class Formula
active_spec.deprecated_options active_spec.deprecated_options
end end
def deprecated_flags
active_spec.deprecated_flags
end
# If a named option is defined for the currently active {SoftwareSpec}. # If a named option is defined for the currently active {SoftwareSpec}.
def option_defined?(name) def option_defined?(name)
active_spec.option_defined?(name) active_spec.option_defined?(name)

View File

@ -154,7 +154,7 @@ class FormulaInstaller
raise "Unrecognized architecture for --bottle-arch: #{arch}" raise "Unrecognized architecture for --bottle-arch: #{arch}"
end end
formula.active_spec.deprecated_flags.each do |deprecated_option| formula.deprecated_flags.each do |deprecated_option|
old_flag = deprecated_option.old_flag old_flag = deprecated_option.old_flag
new_flag = deprecated_option.current_flag new_flag = deprecated_option.current_flag
opoo "#{formula.name}: #{old_flag} was deprecated; using #{new_flag} instead!" opoo "#{formula.name}: #{old_flag} was deprecated; using #{new_flag} instead!"