functions: only enable colors on terminals
We dont want wolors enabled when output is a file or a pipe
This commit is contained in:
parent
62d0c7b832
commit
e65307d6d1
|
@ -175,7 +175,7 @@ enable_colors() {
|
|||
BLUE="\033[1;34m"
|
||||
}
|
||||
|
||||
if [ -n "$USE_COLORS" ]; then
|
||||
if [ -n "$USE_COLORS" ] && [ -t 1 ]; then
|
||||
enable_colors
|
||||
else
|
||||
disable_colors
|
||||
|
|
Loading…
Reference in New Issue