summaryrefslogtreecommitdiff
path: root/evergreen/prelude.sh
diff options
context:
space:
mode:
Diffstat (limited to 'evergreen/prelude.sh')
-rwxr-xr-xevergreen/prelude.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/evergreen/prelude.sh b/evergreen/prelude.sh
index eb671d4b5ae..3844afaead5 100755
--- a/evergreen/prelude.sh
+++ b/evergreen/prelude.sh
@@ -11,7 +11,6 @@ evergreen_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$evergreen_dir/prelude_python.sh"
. "$evergreen_dir/prelude_venv.sh"
. "$evergreen_dir/prelude_db_contrib_tool.sh"
-. "$evergreen_dir/prelude_mongo_task_generator.sh"
expansions_yaml="$evergreen_dir/../../expansions.yml"
expansions_default_yaml="$evergreen_dir/../etc/expansions.default.yml"
@@ -32,6 +31,21 @@ unset expansions_default_yaml
unset script
unset evergreen_dir
+function add_nodejs_to_path {
+ # Add node and npm binaries to PATH
+ if [ "Windows_NT" = "$OS" ]; then
+ # An "npm" directory might not have been created in %APPDATA% by the Windows installer.
+ # Work around the issue by specifying a different %APPDATA% path.
+ # See: https://github.com/nodejs/node-v0.x-archive/issues/8141
+ export APPDATA=${workdir}/npm-app-data
+ export PATH="$PATH:/cygdrive/c/Program Files (x86)/nodejs" # Windows location
+ # TODO: this is to work around BUILD-8652
+ cd "$(pwd -P | sed 's,cygdrive/c/,cygdrive/z/,')"
+ else
+ export PATH="$PATH:/opt/node/bin"
+ fi
+}
+
function posix_workdir {
if [ "Windows_NT" = "$OS" ]; then
echo $(cygpath -u "${workdir}")