Avoids:
Error: failed to download version index (https://nodejs.org/dist/index.tab)
if you try to run without a network connection.
Obviously, `install` will only work if the 14.4.0 has been previously
downloaded, and the Yarn cache has been primed, but if you were able to
clone the repo and run it once, the above will probably be true.
BIN_DIR="$REPO_ROOT/bin"
+NODE_VERSION=14.4.0
+
export PATH="$BIN_DIR":$PATH
# https://stackoverflow.com/a/5947802/2103996
exit 1
fi
-if ! "$N_EXE" which latest &> /dev/null; then
- log_info "Installing Node latest version"
- "$N_EXE" latest
+if ! "$N_EXE" which "$NODE_VERSION" &> /dev/null; then
+ log_info "Installing Node $NODE_VERSION"
+ "$N_EXE" $NODE_VERSION
else
- log_debug "Using Node latest installation"
+ log_debug "Using Node $NODE_VERSION installation"
fi
"$N_EXE" "$@"
source "$REPO_ROOT/bin/common"
-n run latest "$@"
+n run "$NODE_VERSION" "$@"
YARN_EXE="$REPO_ROOT/vendor/yarn-v1.22.4/bin/yarn"
-n exec latest "$YARN_EXE" "$@"
+n exec "$NODE_VERSION" "$YARN_EXE" "$@"