Skip to content

Commit 22ca55d

Browse files
committed
Properly fail when shims' counterparts are not present, fixes #6
1 parent 05f528a commit 22ca55d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libexec/nodenv-exec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ if [ -z "$NODENV_VERSION" ]; then
2525
fi
2626
fi
2727

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

3036
# Put our bindir onto PATH

0 commit comments

Comments
 (0)