Skip to content

Commit

Permalink
Properly fail when shims' counterparts are not present, fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
wfarr committed Mar 26, 2013
1 parent 05f528a commit 22ca55d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libexec/nodenv-exec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ if [ -z "$NODENV_VERSION" ]; then
fi
fi

# if the specified NodeJS version lacks this bin, bail
if [ ! -x "$NODENV_ROOT/versions/$NODENV_VERSION/bin/$1" ]; then
echo "nodenv: \`$1' does not exist for $NODENV_VERSION" >&2
exit 1
fi

export NODENV_VERSION

# Put our bindir onto PATH
Expand Down

0 comments on commit 22ca55d

Please sign in to comment.