From f0605f4a30ae1125ad2e3d8187a45af09b24def0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 23 Aug 2017 18:40:30 +0100 Subject: audit: don't output when searching taps. This messaging was added for the `brew search` command and having it in audit is annoying: (https://github.com/Homebrew/brew/pull/3059#issuecomment-323638672) As a side note: this is why randomly including `cmd/*` is a bad idea. --- Library/Homebrew/cmd/search.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 4a3e21971..acee9817f 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -102,11 +102,13 @@ module Homebrew odie "#{query} is not a valid regex" end - def search_taps(query) + def search_taps(query, silent: false) return [] if ENV["HOMEBREW_NO_GITHUB_API"] # Use stderr to avoid breaking parsed output - $stderr.puts Formatter.headline("Searching taps on GitHub...", color: :blue) + unless silent + $stderr.puts Formatter.headline("Searching taps on GitHub...", color: :blue) + end valid_dirnames = ["Formula", "HomebrewFormula", "Casks", "."].freeze matches = GitHub.search_code(user: ["Homebrew", "caskroom"], filename: query, extension: "rb") -- cgit v1.2.3