dot-files/gvm/scripts/function/display_error

14 lines
208 B
Plaintext

display_error() {
which tput &> /dev/null
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
tput sgr0
tput setaf 1
echo "ERROR: $1" >&2
tput sgr0
else
echo "ERROR: $1" >&2
fi
return 1
}