mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-10 00:02:10 -04:00
disable colors if output is not a tty
This commit is contained in:
parent
e36a91b6cc
commit
0da9b26f26
@ -17,7 +17,7 @@ module HTTPX
|
|||||||
return unless @options.debug
|
return unless @options.debug
|
||||||
return unless @options.debug_level >= level
|
return unless @options.debug_level >= level
|
||||||
message = (+label << msg.call << "\n")
|
message = (+label << msg.call << "\n")
|
||||||
message = "\e[#{COLORS[color]}m#{message}\e[0m" if color
|
message = "\e[#{COLORS[color]}m#{message}\e[0m" if color && @options.debug.isatty
|
||||||
@options.debug << message
|
@options.debug << message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user