extract_utils: Skip colored echo when piped

Change-Id: I8a03a36f3fa022e6858cc5c1dbca8b8037efed03
This commit is contained in:
Bruno Martins
2021-06-21 14:47:40 +01:00
parent f12ce8b81d
commit eed0c8ca3b

View File

@@ -1800,7 +1800,7 @@ function colored_echo() {
white|*) color=7 ;; # white or invalid color white|*) color=7 ;; # white or invalid color
esac esac
fi fi
tput setaf $color if [ -t 1 ] ; then tput setaf $color; fi
printf '%s\n' "$*" printf '%s\n' "$*"
tput sgr0 if [ -t 1 ] ; then tput sgr0; fi
} }