Add support for the HOMEBREW_ASK environment variable

This commit is contained in:
thibhero 2025-02-06 09:07:55 -05:00
parent f989e9a674
commit c8a9cfa4d0
3 changed files with 8 additions and 1 deletions

View File

@ -306,7 +306,7 @@ module Homebrew
Install.check_cc_argv(args.cc)
# Showing dependencies and required size to install
if args.ask?
if args.ask? || !Homebrew::EnvConfig.ask?
ohai "Looking for dependencies..."
package = []
bottle_size = 0

View File

@ -500,6 +500,10 @@ module Homebrew
"of build provenance for bottles from homebrew-core.",
boolean: true,
},
HOMEBREW_ASK: {
description: "If set, pass `--ask`to all formula install commands.",
boolean: true,
},
SUDO_ASKPASS: {
description: "If set, pass the `-A` option when calling `sudo`(8).",
},

View File

@ -315,5 +315,8 @@ module Homebrew::EnvConfig
sig { returns(T::Boolean) }
def verify_attestations?; end
sig { returns(T::Boolean) }
def ask?; end
end
end