From 1ac8e2c5819a6c7af4ee8fa5dfd97195a33dfe06 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 13 Oct 2023 21:27:01 -0500 Subject: [PATCH] fix path handling --- .evergreen/github_app/create_or_modify_comment.sh | 4 ++-- .evergreen/init-node-and-npm-env.sh | 2 +- .evergreen/install-node.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.evergreen/github_app/create_or_modify_comment.sh b/.evergreen/github_app/create_or_modify_comment.sh index 0cd3d5e7..4d4d39a9 100644 --- a/.evergreen/github_app/create_or_modify_comment.sh +++ b/.evergreen/github_app/create_or_modify_comment.sh @@ -2,7 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail set -x -DIR=$(dirname $0) +DIR="$(dirname "${BASH_SOURCE[0]}")" pushd $DIR # Bootstrap the secrets. @@ -10,11 +10,11 @@ bash $DIR/../auth_aws/setup_secrets.sh drivers/comment-bot source secrets-export.sh # Install node and activate it. -set -x bash $DIR/../install-node.sh source $DIR/../init-node-and-npm-env.sh # Install and run the app. +set -x npm install node create_or_modify_comment.mjs "$@" popd diff --git a/.evergreen/init-node-and-npm-env.sh b/.evergreen/init-node-and-npm-env.sh index 9ca920c6..a65456a6 100755 --- a/.evergreen/init-node-and-npm-env.sh +++ b/.evergreen/init-node-and-npm-env.sh @@ -7,7 +7,7 @@ ## access to `npm`, `node`, or need to install something globally from ## npm. -DIR=$(dirname $0) +DIR="$(dirname "${BASH_SOURCE[0]}")" NODE_ARTIFACTS_PATH="$DIR/node-artifacts" if [[ "$OS" == "Windows_NT" ]]; then NODE_ARTIFACTS_PATH=$(cygpath --unix "$NODE_ARTIFACTS_PATH") diff --git a/.evergreen/install-node.sh b/.evergreen/install-node.sh index e2e8bc9e..3f98fb12 100755 --- a/.evergreen/install-node.sh +++ b/.evergreen/install-node.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o errexit # Exit the script with error if any of the commands fail -DIR=$(dirname $0) +DIR="$(dirname "${BASH_SOURCE[0]}")" pushd $DIR NODE_LTS_VERSION=${NODE_LTS_VERSION:-18}