From 83c6f56778b69d3eac5139e56daf66490c270d22 Mon Sep 17 00:00:00 2001 From: "Matthew.Cotton" Date: Thu, 8 May 2025 16:54:58 +1000 Subject: [PATCH] Fixing a small issue with how path was setup previously. If the node install was installed locally previously the script would not pick that up and try to install again. It would fail because the directory already exists and then the path would not get properly setup for the local install of node. This change sets PATH to point to the local install anyway. If it doesn't exist it doesn't matter, if it does exist we use the local install. --- SignallingWebServer/platform_scripts/bash/common.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SignallingWebServer/platform_scripts/bash/common.sh b/SignallingWebServer/platform_scripts/bash/common.sh index 990c35ced..c305324d5 100644 --- a/SignallingWebServer/platform_scripts/bash/common.sh +++ b/SignallingWebServer/platform_scripts/bash/common.sh @@ -145,6 +145,9 @@ function setup_node() { popd > /dev/null + # setup path with our possibly locally installed node + PATH="${SCRIPT_DIR}/node/bin:$PATH" + # navigate to project root pushd "${SCRIPT_DIR}/../../.." > /dev/null @@ -170,11 +173,6 @@ function setup_node() { && rm node.tar.xz && mv node-v*-*-* \"${SCRIPT_DIR}/node\"" - if [ $? -eq 1 ]; then - # installed node, point PATH to it - PATH="${SCRIPT_DIR}/node/bin:$PATH" - fi - # if node_modules doesnt exist or the package-lock file is newer than node_modules, install deps if [ ! -d node_modules ] || [ ../package-lock.json -nt node_modules ] || [ "$INSTALL_DEPS" == "1" ]; then echo "Installing dependencies..."