Skip to content
Snippets Groups Projects
Unverified Commit ada72272 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #8246 from MikeMcQuaid/fix-upgrade-args

cmd/upgrade: fix cask/formula args (again).
parents 4c23fd01 863a0964
No related branches found
No related tags found
No related merge requests found
......@@ -77,14 +77,16 @@ module Homebrew
# If one or more formulae are specified, but no casks were
# specified, we want to make note of that so we don't
# try to upgrade all outdated casks.
upgrade_formulae = formulae.present? && casks.blank? && !args.cask?
upgrade_casks = casks.present? && formulae.blank? && !args.formula?
upgrade_formulae = formulae.present? && casks.blank?
upgrade_casks = casks.present? && formulae.blank?
upgrade_outdated_formulae(formulae, args: args) unless upgrade_casks
upgrade_outdated_casks(casks, args: args) unless upgrade_formulae
end
def upgrade_outdated_formulae(formulae, args:)
return if args.cask?
FormulaInstaller.prevent_build_flags(args)
Install.perform_preinstall_checks
......@@ -143,6 +145,8 @@ module Homebrew
end
def upgrade_outdated_casks(casks, args:)
return if args.formula?
Cask::Cmd::Upgrade.upgrade_casks(
*casks,
force: args.force?,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment