From 403887deb619213c429e5a1e8ad96e4314959a98 Mon Sep 17 00:00:00 2001 From: thibhero Date: Fri, 7 Feb 2025 15:23:36 -0500 Subject: [PATCH] moving back to `--ask` option --- Library/Homebrew/cmd/install.rb | 6 +++--- Library/Homebrew/env_config.rb | 8 ++++---- .../Homebrew/sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi | 2 +- Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 6ff3790946..91800deee6 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -120,10 +120,10 @@ module Homebrew [:switch, "--overwrite", { 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. " \ "Print bottles and dependencies download size and install size.", - env: :install_ask, + env: :ask, }], ].each do |args| options = args.pop @@ -325,7 +325,7 @@ module Homebrew Install.check_cc_argv(args.cc) # Showing dependencies and required size to install - if args.install_ask? + if args.ask? ohai "Looking for bottle sizes..." sized_formulae = [] total_download_size = 0 diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index 8b906ec51c..bdc89ed3da 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -48,6 +48,10 @@ module Homebrew "trying any other/default URLs.", boolean: true, }, + HOMEBREW_ASK: { + description: "If set, pass `--ask`to all formula install commands.", + boolean: true, + }, HOMEBREW_AUTO_UPDATE_SECS: { description: "Run `brew update` once every `$HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \ "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.", default: "git", }, - HOMEBREW_INSTALL_ASK: { - description: "If set, pass `--install-ask`to all formula install commands.", - boolean: true, - }, HOMEBREW_INSTALL_BADGE: { description: "Print this text before the installation summary of each successful build.", default_text: 'The "Beer Mug" emoji.', diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi index 86f722e56a..c6967205e7 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi @@ -168,5 +168,5 @@ class Homebrew::Cmd::InstallCmd::Args < Homebrew::CLI::Args def zap?; end sig { returns(T::Boolean) } - def install_ask?; end + def ask?; end end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi index 071c6a8dbc..a6a0e07bc0 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi @@ -317,6 +317,6 @@ module Homebrew::EnvConfig def verify_attestations?; end sig { returns(T::Boolean) } - def install_ask?; end + def ask?; end end end