Skip to content

Commit 6ed5874

Browse files
committed
Check nvmrc node version names
1 parent ac805cd commit 6ed5874

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bin/moodle-docker-compose

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ fi
9898
if [[ -z "$MOODLE_DOCKER_APP_NODE_VERSION" ]] && [[ ! -z "$MOODLE_DOCKER_APP_PATH" ]];
9999
then
100100
appnodeversion="$(cat $MOODLE_DOCKER_APP_PATH/.nvmrc | sed -E "s/v(([0-9]+\.?)+)/\1/" || true)"
101+
appnodeversion="${appnodeversion//\//-}"
101102

102103
export MOODLE_DOCKER_APP_NODE_VERSION="$appnodeversion"
103104
fi

tests/app-setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ then
1919
echo -e "\nunsafe-perm=true" >> $basedir/app/.npmrc
2020
fi
2121

22-
nodeversion="$(cat $MOODLE_DOCKER_APP_PATH/.nvmrc | grep -oP '(\d+\.?)+' || true)"
22+
nodeversion="$(cat $MOODLE_DOCKER_APP_PATH/.nvmrc | sed -E "s/v(([0-9]+\.?)+)/\1/" || true)"
23+
nodeversion="${nodeversion//\//-}"
2324

2425
docker run --volume $basedir/app:/app --workdir /app node:$nodeversion bash -c "npm ci"
2526
elif [ "$SUITE" = "app" ];

0 commit comments

Comments
 (0)