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"
|
BLUE="\033[1;34m"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$USE_COLORS" ]; then
|
if [ -n "$USE_COLORS" ] && [ -t 1 ]; then
|
||||||
enable_colors
|
enable_colors
|
||||||
else
|
else
|
||||||
disable_colors
|
disable_colors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user