add greedy option

This commit is contained in:
Razvan Azamfirei 2023-04-05 09:28:15 -04:00
parent dfa7a60038
commit 183fad82a6
No known key found for this signature in database
GPG Key ID: 62E97BFCB12046BD
3 changed files with 11 additions and 1 deletions

View File

@ -40,9 +40,12 @@ module Cask
require_sha: nil
)
if
quarantine = true if quarantine.nil?
if Homebrew::EnvConfig.upgrade_greedy?
greedy = true
end
outdated_casks = if casks.empty?
Caskroom.casks(config: Config.from_args(args)).select do |cask|
cask.outdated?(greedy: greedy, greedy_latest: greedy_latest,

View File

@ -347,6 +347,10 @@ module Homebrew
description: "If set, use Pry for the `brew irb` command.",
boolean: true,
},
HOMEBREW_UPGRADE_GREEDY: {
description: "If set, run `--greedy` with all upgrade commands",
boolean: true,
},
HOMEBREW_SIMULATE_MACOS_ON_LINUX: {
description: "If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful " \
"when auditing macOS formulae while on Linux.",

View File

@ -229,6 +229,9 @@ module Homebrew::EnvConfig
sig { returns(T::Boolean) }
def self.update_to_tag?; end
sig { returns(T::Boolean) }
def self.upgrade_greedy?; end
sig { returns(T::Boolean) }
def self.verbose?; end