From 7388acb86e0b9811e6badd610255954b3b3a6453 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Mon, 12 Feb 2018 11:06:55 -0600 Subject: Tty: if HOMEBREW_NO_COLOR env var is present, disable color bin/brew will recognize NO_COLOR variable and copy it to HOMEBREW_NO_COLOR --- Library/Homebrew/utils/tty.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/utils') diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index e872e6460..81d5f00d7 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -59,7 +59,9 @@ module Tty end def to_s - return "" unless $stdout.tty? + if ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty? + return "" + end current_escape_sequence ensure reset_escape_sequence! -- cgit v1.2.3