From 671bb3a7f8b294137d0217c16bbb7cc3c0a9cbf9 Mon Sep 17 00:00:00 2001 From: Ryan Rotter Date: Mon, 22 Apr 2024 22:32:26 -0400 Subject: [PATCH] --quiet silences "Using xyz" in `brew bundle install` --- cmd/bundle.rb | 1 + lib/bundle/commands/install.rb | 4 ++-- lib/bundle/installer.rb | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/bundle.rb b/cmd/bundle.rb index 989fa362e..78d209670 100755 --- a/cmd/bundle.rb +++ b/cmd/bundle.rb @@ -107,6 +107,7 @@ def run no_upgrade: args.no_upgrade?, verbose: args.verbose?, force: args.force?, + quiet: args.quiet?, ) cleanup = if ENV.fetch("HOMEBREW_BUNDLE_INSTALL_CLEANUP", nil) diff --git a/lib/bundle/commands/install.rb b/lib/bundle/commands/install.rb index 558dfff33..09a3ac9dc 100644 --- a/lib/bundle/commands/install.rb +++ b/lib/bundle/commands/install.rb @@ -5,11 +5,11 @@ module Commands module Install module_function - def run(global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false) + def run(global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false, quiet: false) parsed_entries = Bundle::Dsl.new(Brewfile.read(global:, file:)).entries Bundle::Installer.install( parsed_entries, - global:, file:, no_lock:, no_upgrade:, verbose:, force:, + global:, file:, no_lock:, no_upgrade:, verbose:, force:, quiet:, ) || exit(1) end end diff --git a/lib/bundle/installer.rb b/lib/bundle/installer.rb index d50f1adb2..7e41754f4 100644 --- a/lib/bundle/installer.rb +++ b/lib/bundle/installer.rb @@ -4,7 +4,8 @@ module Bundle module Installer module_function - def install(entries, global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false) + def install(entries, global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false, + quiet: false) success = 0 failure = 0 @@ -42,7 +43,7 @@ def install(entries, global: false, file: nil, no_lock: false, no_upgrade: false puts Formatter.success("#{verb} #{name}") true else - puts "Using #{name}" + puts "Using #{name}" unless quiet false end