From 9cf0a7409b05bcbd93fbf47f095b16eaa4ad24ea Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Sat, 3 Jul 2021 11:58:16 +1000 Subject: [PATCH] fix style --- Library/Homebrew/cask/cmd/upgrade.rb | 12 +++++++++--- Library/Homebrew/cmd/outdated.rb | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/cask/cmd/upgrade.rb b/Library/Homebrew/cask/cmd/upgrade.rb index 43e9b6dcd7..248bbd3874 100644 --- a/Library/Homebrew/cask/cmd/upgrade.rb +++ b/Library/Homebrew/cask/cmd/upgrade.rb @@ -120,9 +120,15 @@ module Cask return false if outdated_casks.empty? if casks.empty? && !greedy - ohai "Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them." if !args.greedy_auto_updates? && !args.greedy_latest? - ohai "Casks with 'version :latest' will not be upgraded; pass `--greedy-latest` to upgrade them." if args.greedy_auto_updates? && !args.greedy_latest? - ohai "Casks with 'auto_updates true' will not be upgraded; pass `--greedy-auto-updates` to upgrade them." if !args.greedy_auto_updates? && args.greedy_latest? + if !args.greedy_auto_updates? && !args.greedy_latest? + ohai "Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them." + end + if args.greedy_auto_updates? && !args.greedy_latest? + ohai "Casks with 'version :latest' will not be upgraded; pass `--greedy-latest` to upgrade them." + end + if !args.greedy_auto_updates? && args.greedy_latest? + ohai "Casks with 'auto_updates true' will not be upgraded; pass `--greedy-auto-updates` to upgrade them." + end end verb = dry_run ? "Would upgrade" : "Upgrading" diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index 5dd535fe80..ea736e70e2 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -147,8 +147,8 @@ module Homebrew else c = formula_or_cask - c.outdated_info(args.greedy?, verbose?, true, greedy_latest: args.greedy_latest?, - greedy_auto_updates: args.greedy_auto_updates?) + c.outdated_info(args.greedy?, verbose?, true, greedy_latest: args.greedy_latest?, + greedy_auto_updates: args.greedy_auto_updates?) end end end