diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index e033f85111..62e7cd232f 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -161,8 +161,9 @@ module Tty return false if Homebrew::EnvConfig.no_color? return true if Homebrew::EnvConfig.color? + return false if @stream.blank? - !!@stream&.tty? + @stream.tty? end end end