diff options
Diffstat (limited to 'main/abuild/0001-Allow-forcing-of-colored-output.patch')
-rw-r--r-- | main/abuild/0001-Allow-forcing-of-colored-output.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/main/abuild/0001-Allow-forcing-of-colored-output.patch b/main/abuild/0001-Allow-forcing-of-colored-output.patch new file mode 100644 index 0000000000..0606dcff85 --- /dev/null +++ b/main/abuild/0001-Allow-forcing-of-colored-output.patch @@ -0,0 +1,29 @@ +From 0a79fc62c9d0aa30eb42ff4251701eee2368309d Mon Sep 17 00:00:00 2001 +From: Carlo Landmeter <clandmeter@alpinelinux.org> +Date: Mon, 25 Feb 2019 23:02:09 +0000 +Subject: [PATCH] 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(-) + +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 +-- +2.21.0 + |