moving back to --ask option

This commit is contained in:
thibhero 2025-02-07 15:23:36 -05:00
parent bebbd6274e
commit 403887deb6
4 changed files with 9 additions and 9 deletions

View File

@ -120,10 +120,10 @@ module Homebrew
[:switch, "--overwrite", { [:switch, "--overwrite", {
description: "Delete files that already exist in the prefix while linking.", description: "Delete files that already exist in the prefix while linking.",
}], }],
[:switch, "--install-ask", { [:switch, "--ask", {
description: "Ask for confirmation before downloading and installing formulae. " \ description: "Ask for confirmation before downloading and installing formulae. " \
"Print bottles and dependencies download size and install size.", "Print bottles and dependencies download size and install size.",
env: :install_ask, env: :ask,
}], }],
].each do |args| ].each do |args|
options = args.pop options = args.pop
@ -325,7 +325,7 @@ module Homebrew
Install.check_cc_argv(args.cc) Install.check_cc_argv(args.cc)
# Showing dependencies and required size to install # Showing dependencies and required size to install
if args.install_ask? if args.ask?
ohai "Looking for bottle sizes..." ohai "Looking for bottle sizes..."
sized_formulae = [] sized_formulae = []
total_download_size = 0 total_download_size = 0

View File

@ -48,6 +48,10 @@ module Homebrew
"trying any other/default URLs.", "trying any other/default URLs.",
boolean: true, boolean: true,
}, },
HOMEBREW_ASK: {
description: "If set, pass `--ask`to all formula install commands.",
boolean: true,
},
HOMEBREW_AUTO_UPDATE_SECS: { HOMEBREW_AUTO_UPDATE_SECS: {
description: "Run `brew update` once every `$HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \ description: "Run `brew update` once every `$HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \
"e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, " \ "e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, " \
@ -304,10 +308,6 @@ module Homebrew
description: "Linux only: Set this value to a new enough `git` executable for Homebrew to use.", description: "Linux only: Set this value to a new enough `git` executable for Homebrew to use.",
default: "git", default: "git",
}, },
HOMEBREW_INSTALL_ASK: {
description: "If set, pass `--install-ask`to all formula install commands.",
boolean: true,
},
HOMEBREW_INSTALL_BADGE: { HOMEBREW_INSTALL_BADGE: {
description: "Print this text before the installation summary of each successful build.", description: "Print this text before the installation summary of each successful build.",
default_text: 'The "Beer Mug" emoji.', default_text: 'The "Beer Mug" emoji.',

View File

@ -168,5 +168,5 @@ class Homebrew::Cmd::InstallCmd::Args < Homebrew::CLI::Args
def zap?; end def zap?; end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def install_ask?; end def ask?; end
end end

View File

@ -317,6 +317,6 @@ module Homebrew::EnvConfig
def verify_attestations?; end def verify_attestations?; end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def install_ask?; end def ask?; end
end end
end end