Skip to content

Commit

Permalink
Merge pull request #1346 from rrotter/be_quiet
Browse files Browse the repository at this point in the history
--quiet silences "Using xyz" in `brew bundle install`
  • Loading branch information
MikeMcQuaid committed Apr 23, 2024
2 parents bfeed44 + 671bb3a commit b43e551
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions cmd/bundle.rb
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/bundle/commands/install.rb
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/bundle/installer.rb
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b43e551

Please sign in to comment.