44OS_ARCH=" $( uname " -m" ) "
55
66export BASEDIR=" $PWD /.evergreen"
7- export PATH=" /opt/devtools/node20/bin:/opt/devtools/ bin:/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR /mingit/cmd:$BASEDIR /mingit/mingw64/libexec/git-core:$BASEDIR /git-2:$BASEDIR /npm-10/node_modules/.bin:$BASEDIR /node-v$NODE_JS_VERSION -win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:$PATH "
7+ export PATH=" /opt/devtools/bin:/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR /mingit/cmd:$BASEDIR /mingit/mingw64/libexec/git-core:$BASEDIR /git-2:$BASEDIR /npm-10/node_modules/.bin:$BASEDIR /node-v$NODE_JS_VERSION -win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:$PATH "
88
99export MONGOSH_GLOBAL_CONFIG_FILE_FOR_TESTING=" $BASEDIR /../../testing/tests-globalconfig.conf"
1010
@@ -18,19 +18,16 @@ if [ x"$TERM" = x"dumb" ]; then
1818fi
1919echo " TERM variable is set to '${TERM:- } '"
2020
21- if [ " $OS " != " Windows_NT" ]; then
22- if which realpath; then # No realpath on macOS, but also not needed there
23- export HOME=" $( realpath " $HOME " ) " # Needed to de-confuse nvm when /home is a symlink
24- fi
25- export NVM_DIR=" $BASEDIR /.nvm"
26- echo " Setting NVM environment home: $NVM_DIR "
27- [ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh"
28- set +x # nvm is very verbose
29- echo nvm use $NODE_JS_VERSION || nvm use 20.11.1
30- nvm use $NODE_JS_VERSION || nvm use 20.11.1 # see install-node.sh
31- set -x
32- export PATH=" $NVM_BIN :$PATH "
21+ NODE_JS_MAJOR_VERSION=$( echo " $NODE_JS_VERSION " | awk -F . ' {print $1}' )
22+ if echo " $NODE_JS_MAJOR_VERSION " | grep -q ' ^[0-9]*$' ; then
23+ export PATH=" /opt/devtools/node20/bin:$PATH "
24+ node -v | grep -q " ^v$NODE_JS_VERSION "
25+ else
26+ echo " Cannot identify major version from NODE_JS_VERSION: $NODE_JS_VERSION "
27+ exit 1
28+ fi
3329
30+ if [ " $OS " != " Windows_NT" ]; then
3431 if [ ` uname` = Darwin ]; then
3532 echo " Using clang version:"
3633 (which clang && clang --version)
0 commit comments