From e6a5374bfb74a9c70b65c40a9765275c027aafe8 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Sat, 22 Feb 2014 00:06:53 +1000 Subject: [PATCH] colorize output only if echo supports it --- nvm.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 75b2be6..18979f1 100755 --- a/nvm.sh +++ b/nvm.sh @@ -132,7 +132,11 @@ nvm_checksum() { } colorize_version() { - echo $DASH_E "\033[0;34m$1\033[0m" + if [ -n "$DASH_E" ]; then + echo $DASH_E "\033[0;34m$1\033[0m" + else + echo $1 + fi } print_versions() {