search: Print error message to stderr when not using a tty
This commit is contained in:
parent
2baabf58d4
commit
9e9e2e63e8
@ -108,9 +108,8 @@ module Homebrew
|
||||
puts Formatter.columns(all_casks)
|
||||
end
|
||||
|
||||
count = all_formulae.count + all_casks.count
|
||||
if $stdout.tty?
|
||||
count = all_formulae.count + all_casks.count
|
||||
|
||||
if (reason = MissingFormula.reason(query, silent: true)) && !local_casks.include?(query)
|
||||
if count.positive?
|
||||
puts
|
||||
@ -121,6 +120,8 @@ module Homebrew
|
||||
puts "No formula or cask found for #{query.inspect}."
|
||||
GitHub.print_pull_requests_matching(query)
|
||||
end
|
||||
elsif count.zero?
|
||||
$stderr.puts "No formula or cask found for #{query.inspect}."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user