summaryrefslogtreecommitdiffstats
path: root/functions.sh.in
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2019-02-25 23:02:09 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-02-25 23:10:16 +0000
commit0a79fc62c9d0aa30eb42ff4251701eee2368309d (patch)
tree69c90bec4f187816ed3a344df7b2acfcdb14cb93 /functions.sh.in
parent376ccc5bd695e792768a679409fbb428defe0770 (diff)
downloadabuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.tar.bz2
abuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.tar.xz
Allow forcing of colored output
In some cases (ie drone ci) there is no tty available but its still possible to display colors in the webui.
Diffstat (limited to 'functions.sh.in')
-rw-r--r--functions.sh.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions.sh.in b/functions.sh.in
index 4f2c023..ea21f25 100644
--- a/functions.sh.in
+++ b/functions.sh.in
@@ -243,7 +243,9 @@ enable_colors() {
BLUE="\033[1;34m"
}
-if [ -n "$USE_COLORS" ] && [ -t 1 ]; then
+if [ "$USE_COLORS" = force ]; then
+ enable_colors
+elif [ -n "$USE_COLORS" ] && [ -t 1 ]; then
enable_colors
else
disable_colors