diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-02-25 23:02:09 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-02-25 23:10:16 +0000 |
commit | 0a79fc62c9d0aa30eb42ff4251701eee2368309d (patch) | |
tree | 69c90bec4f187816ed3a344df7b2acfcdb14cb93 /functions.sh.in | |
parent | 376ccc5bd695e792768a679409fbb428defe0770 (diff) | |
download | abuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.tar.gz abuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.tar.bz2 abuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.tar.xz abuild-0a79fc62c9d0aa30eb42ff4251701eee2368309d.zip |
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.in | 4 |
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 |