Skip to content

Commit 2d6ff6e

Browse files
committed
Fixing more path issues in platform_scripts (#604)
* feat: Adding script tests where the scripts are run multiple times. This tests that the scripts still work when things have already been installed. * fix: Fixing typo in github action. * gimme a break. * Adding mutliple script runs for other OSs * Testing node on the runner * Trying to figure out what node is doing what. * Trying to change the way node version is detected. * Messy * The additions to the script really didn't catch anything. Could be worth revisiting how we handle the local node install. * Removing debug print. (cherry picked from commit 2321fa9)
1 parent 1ab7e56 commit 2d6ff6e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/healthcheck-platform-scripts.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ jobs:
4343
run: |
4444
Start-Process -NoNewWindow ".\platform_scripts\cmd\start.bat" -ArgumentList "--rest_api","--player_port 999"
4545
curl --retry 10 --retry-delay 20 --retry-connrefused http://localhost:999/api/status
46-

SignallingWebServer/platform_scripts/bash/common.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ function setup_node() {
162162
# navigate to project root
163163
pushd "${SCRIPT_DIR}/../../.." > /dev/null
164164

165+
# setup the path so we're using our node. required when calling npm
166+
PATH="${SCRIPT_DIR}/node/bin:$PATH"
167+
165168
node_version=""
166169
if [[ -f "${SCRIPT_DIR}/node/bin/node" ]]; then
167170
node_version=$("${SCRIPT_DIR}/node/bin/node" --version)
@@ -181,14 +184,13 @@ function setup_node() {
181184
else
182185
node_url="https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz"
183186
fi
184-
check_and_install "node" "$node_version" "$NODE_VERSION" "curl $node_url --output node.tar.xz
187+
check_and_install "${SCRIPT_DIR}/node/bin/node" "$node_version" "$NODE_VERSION" "curl $node_url --output node.tar.xz
185188
&& tar -xf node.tar.xz
186189
&& rm node.tar.xz
187190
&& mv node-v*-*-* \"${SCRIPT_DIR}/node\""
188191

189192
if [ $? -eq 1 ] || [ "$INSTALL_DEPS" == "1" ]; then
190193
echo "Installing dependencies..."
191-
PATH="${SCRIPT_DIR}/node/bin:$PATH"
192194
"${NPM}" install
193195
fi
194196

0 commit comments

Comments
 (0)