diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 99954d91e5f27d8498490a1618ceff0e918fd4a1..07558cbecf3e95f2eaceaf26ba8f60876abcf91a 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -29,7 +29,7 @@ module Homebrew extend self end end - unless ARGV.include? '--ignore-dependencies' + unless ARGV.ignore_deps? # Expand the outdated list to include outdated dependencies then sort and # reduce such that dependencies are installed first and installation is not # attempted twice. Sorting is implicit the way `recursive_deps` returns diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 4b0c71d034598212be2d185a88ade39fb3162f98..9c145d1abcee49c7b2c589a5a489889d7be12416 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -89,6 +89,10 @@ module HomebrewArgvExtension include?('--dry-run') || switch?('n') end + def ignore_deps? + include? '--ignore-dependencies' + end + def build_head? include? '--HEAD' end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index fe4ac30864092e0292eca2532801b89466ebaaaf..7421cabe0821c81c47b9f0c43535e5ec9ef34241 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -16,7 +16,7 @@ class FormulaInstaller @f = ff @tab = tab @show_header = true - @ignore_deps = ARGV.include? '--ignore-dependencies' || ARGV.interactive? + @ignore_deps = ARGV.ignore_deps? || ARGV.interactive? @install_bottle = install_bottle? ff check_install_sanity