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.
This commit is contained in:
Carlo Landmeter 2019-02-25 23:02:09 +00:00
parent 376ccc5bd6
commit 0a79fc62c9
1 changed files with 3 additions and 1 deletions

View File

@ -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