Skip to content

Commit

Permalink
Merge pull request #18330 from Homebrew/package-conflicts-message-quiet
Browse files Browse the repository at this point in the history
cli/named_args: silence `package_conflicts_message` with `--quiet`
  • Loading branch information
MikeMcQuaid authored Sep 16, 2024
2 parents 07bab08 + 150e14f commit 8fd78bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Library/Homebrew/cli/named_args.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ def load_formula_or_cask(name, only: nil, method: nil, warn: nil)
Failed to load cask: #{name}
#{unreadable_error}
EOS
opoo package_conflicts_message(name, "formula", cask)
opoo package_conflicts_message(name, "formula", cask) unless Context.current.quiet?
end
return formula_or_kegs
elsif cask
opoo package_conflicts_message(name, "cask", formula_or_kegs) if formula_or_kegs
if formula_or_kegs && !Context.current.quiet?
opoo package_conflicts_message(name, "cask", formula_or_kegs)
end
return cask
end
end
Expand Down Expand Up @@ -519,6 +521,7 @@ def warn_if_cask_conflicts(ref, loaded_type)
nil
end
return unless available
return if Context.current.quiet?

opoo package_conflicts_message(ref, loaded_type, cask)
end
Expand Down

0 comments on commit 8fd78bf

Please sign in to comment.