From b16bf303ca8b079478cb98fa6f6b8105838137f5 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Wed, 18 Jun 2014 08:54:14 +0200 Subject: [PATCH] Suppress output of `nvm use` +redirect errors to stdout --- nvm-exec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvm-exec b/nvm-exec index b78c967..f40dd3a 100755 --- a/nvm-exec +++ b/nvm-exec @@ -5,9 +5,9 @@ DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$DIR/nvm.sh" if [ -n "$NODE_VERSION" ]; then - nvm use $NODE_VERSION || (echo "NODE_VERSION not set" && exit 127) + nvm use $NODE_VERSION > /dev/null || (echo "NODE_VERSION not set" >&2 && exit 127) else - nvm use || (echo "No .nvmrc file found" && exit 127) + nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127) fi exec $@