cli/named_args: silence package_conflicts_message with --quiet
Based on feedback from Homebrew/discussions#5602. While users can already silence this by passing `--formula` or `--cask` as required, I am inclined to agree that `--quiet` should probably silence messages that are relatively low priority (of which I think this is one).
This commit is contained in:
parent
1f306b4d15
commit
150e14f83d
@ -231,11 +231,13 @@ module Homebrew
|
|||||||
Failed to load cask: #{name}
|
Failed to load cask: #{name}
|
||||||
#{unreadable_error}
|
#{unreadable_error}
|
||||||
EOS
|
EOS
|
||||||
opoo package_conflicts_message(name, "formula", cask)
|
opoo package_conflicts_message(name, "formula", cask) unless Context.current.quiet?
|
||||||
end
|
end
|
||||||
return formula_or_kegs
|
return formula_or_kegs
|
||||||
elsif cask
|
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
|
return cask
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -519,6 +521,7 @@ module Homebrew
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
return unless available
|
return unless available
|
||||||
|
return if Context.current.quiet?
|
||||||
|
|
||||||
opoo package_conflicts_message(ref, loaded_type, cask)
|
opoo package_conflicts_message(ref, loaded_type, cask)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user