summaryrefslogtreecommitdiffstats
path: root/functions.sh.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-30 13:53:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-30 13:53:17 +0000
commite65307d6d11f843750e6f539277803196d6f4c6a (patch)
tree14784f0a526182239d6072c3d03c00d680aa45b5 /functions.sh.in
parent62d0c7b832a3bfd9feaf1546d5382784ec101df1 (diff)
downloadabuild-e65307d6d11f843750e6f539277803196d6f4c6a.tar.bz2
abuild-e65307d6d11f843750e6f539277803196d6f4c6a.tar.xz
functions: only enable colors on terminals
We dont want wolors enabled when output is a file or a pipe
Diffstat (limited to 'functions.sh.in')
-rw-r--r--functions.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions.sh.in b/functions.sh.in
index 719b354..4bdda5d 100644
--- a/functions.sh.in
+++ b/functions.sh.in
@@ -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