Skip to content

Commit 00aaa52

Browse files
Fixing a small issue with how path was setup previously. (#611)
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.
1 parent f27bace commit 00aaa52

File tree

1 file changed

+3
-5
lines changed
  • SignallingWebServer/platform_scripts/bash

1 file changed

+3
-5
lines changed

SignallingWebServer/platform_scripts/bash/common.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ function setup_node() {
145145

146146
popd > /dev/null
147147

148+
# setup path with our possibly locally installed node
149+
PATH="${SCRIPT_DIR}/node/bin:$PATH"
150+
148151
# navigate to project root
149152
pushd "${SCRIPT_DIR}/../../.." > /dev/null
150153

@@ -170,11 +173,6 @@ function setup_node() {
170173
&& rm node.tar.xz
171174
&& mv node-v*-*-* \"${SCRIPT_DIR}/node\""
172175

173-
if [ $? -eq 1 ]; then
174-
# installed node, point PATH to it
175-
PATH="${SCRIPT_DIR}/node/bin:$PATH"
176-
fi
177-
178176
# if node_modules doesnt exist or the package-lock file is newer than node_modules, install deps
179177
if [ ! -d node_modules ] || [ ../package-lock.json -nt node_modules ] || [ "$INSTALL_DEPS" == "1" ]; then
180178
echo "Installing dependencies..."

0 commit comments

Comments
 (0)