From 0a79fc62c9d0aa30eb42ff4251701eee2368309d Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Mon, 25 Feb 2019 23:02:09 +0000 Subject: 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. --- functions.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'functions.sh.in') 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 -- cgit v1.2.3