diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 667676789d..f869f43afd 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -34,6 +34,8 @@ module Homebrew end HOMEBREW_LIBRARY_PATH.cd do + ENV.delete("HOMEBREW_COLOR") + ENV.delete("HOMEBREW_NO_COLOR") ENV.delete("HOMEBREW_VERBOSE") ENV.delete("VERBOSE") ENV.delete("HOMEBREW_CASK_OPTS") diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index eb6f02746f..fb53968c5f 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -61,7 +61,7 @@ module Tty end def to_s - if ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty? + if !ENV["HOMEBREW_COLOR"] && (ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty?) return "" end current_escape_sequence