remove extra command output when running brew list -v <formula>

`brew list -v <formula>` is used to list all files inside formula's keg.

However since 70b93f65eab70cd84d221059a2864a52202df141, an extra
`find /usr/local/Cellar/<formula>/<version> -not -type d -print` will be
printed out. Fix the problem by using `system_command!` instead of
`safe_system`.
This commit is contained in:
Cheng XU 2019-07-16 18:41:37 +08:00
parent bf0f1bd304
commit ce00a94737
No known key found for this signature in database
GPG Key ID: B19F15830AB4E690

View File

@ -71,7 +71,7 @@ module Homebrew
safe_system "ls", *ARGV.options_only << HOMEBREW_CELLAR
end
elsif args.verbose? || !$stdout.tty?
safe_system "find", *ARGV.kegs.map(&:to_s) + %w[-not -type d -print]
system_command! "find", args: ARGV.kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
else
ARGV.kegs.each { |keg| PrettyListing.new keg }
end