diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6359ea8dbc..d7983462ca 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -152,8 +152,8 @@ class FormulaInstaller !formula.bottle_disabled? end - sig { params(install_bottle_options: { warn: T::Boolean }).returns(T::Boolean) } - def pour_bottle?(install_bottle_options = { warn: false }) + sig { params(output_warning: T::Boolean).returns(T::Boolean) } + def pour_bottle?(output_warning: false) return false if @pour_failed return false if !formula.bottle_tag? && !formula.local_bottle_path @@ -164,7 +164,7 @@ class FormulaInstaller return false if formula.bottle_disabled? unless formula.pour_bottle? - if install_bottle_options[:warn] && formula.pour_bottle_check_unsatisfied_reason + if output_warning && formula.pour_bottle_check_unsatisfied_reason opoo <<~EOS Building #{formula.full_name} from source: #{formula.pour_bottle_check_unsatisfied_reason} @@ -175,7 +175,7 @@ class FormulaInstaller bottle = formula.bottle_specification unless bottle.compatible_locations? - if install_bottle_options[:warn] + if output_warning opoo <<~EOS Building #{formula.full_name} from source as the bottle needs: - HOMEBREW_CELLAR: #{bottle.cellar} (yours is #{HOMEBREW_CELLAR}) @@ -1111,7 +1111,7 @@ class FormulaInstaller return if only_deps? - if pour_bottle?(warn: true) + if pour_bottle?(output_warning: true) begin downloader.fetch rescue Exception => e # rubocop:disable Lint/RescueException