ci/deploy.sh: Fix "notify" on dumb terminals 39/38539/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 1 Aug 2017 17:48:33 +0000 (19:48 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 1 Aug 2017 17:52:49 +0000 (19:52 +0200)
Dumb terminals (which do not support colors), like "vt220",
make `tput setaf` return with an error code, hence bypassing the
actual print.

Change-Id: Id838583beb30a810aec478ed80d452c6f3203e0f
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh

index 3ac7ff1..a77dd0f 100755 (executable)
@@ -106,7 +106,7 @@ EOF
 # BEGIN of colored notification wrapper
 #
 notify() {
-    tput setaf "${2:-1}"
+    tput setaf "${2:-1}" || true
     echo -en "${1:-"[WARN] Unsupported opt arg: $3\\n"}"
     tput sgr0
 }