From a1dca3632af0389a902a09e01df732b16986ebf8 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Tue, 30 Aug 2016 21:34:31 +0100 Subject: [PATCH 1/2] Prevent consoletype failure from aborting scripts with set -e --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 82cde51..9d47e6c 100644 --- a/functions.sh +++ b/functions.sh @@ -421,7 +421,7 @@ RC_DOT_PATTERN='' # have a TTY. rc unsets it at the end of running so it shouldn't hang # around if [ -z "${CONSOLETYPE}" ] ; then - CONSOLETYPE="$(consoletype stdout 2>/dev/null )"; export CONSOLETYPE + CONSOLETYPE="$(! consoletype stdout 2>/dev/null)"; export CONSOLETYPE fi if [ "${CONSOLETYPE}" = "serial" ] ; then RC_NOCOLOR="yes" -- 2.8.2