[Fix] add missing quotes for $NODE_VERSION in nvm-exec
parent
7ed1e71944
commit
ac63638469
3
nvm-exec
3
nvm-exec
|
@ -2,10 +2,11 @@
|
||||||
|
|
||||||
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
\. "$DIR/nvm.sh" --no-use
|
\. "$DIR/nvm.sh" --no-use
|
||||||
|
|
||||||
if [ -n "$NODE_VERSION" ]; then
|
if [ -n "$NODE_VERSION" ]; then
|
||||||
nvm use $NODE_VERSION > /dev/null || exit 127
|
nvm use "$NODE_VERSION" > /dev/null || exit 127
|
||||||
elif ! nvm use >/dev/null 2>&1; then
|
elif ! nvm use >/dev/null 2>&1; then
|
||||||
echo "No NODE_VERSION provided; no .nvmrc file found" >&2
|
echo "No NODE_VERSION provided; no .nvmrc file found" >&2
|
||||||
exit 127
|
exit 127
|
||||||
|
|
Loading…
Reference in New Issue