From 62497462e0b7b515b1efe84b9e0ff19ae1f798ee Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 12 Jul 2023 19:25:15 +0100 Subject: [PATCH] Don't always install node in the virtualenv if it's already installed system-wide at the correct version. Prevent node installation issues during CI builds where we install node with the setup-node action but it was ignored because it was not inside the virtualenv, e.g.: https://github.com/galaxyproject/galaxy/actions/runs/5530959878/jobs/10091018774 --- scripts/common_startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/common_startup.sh b/scripts/common_startup.sh index 48f1f936ec2b..4c8cf730c5bf 100755 --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -199,7 +199,7 @@ fi # Install node if not installed if [ -n "$VIRTUAL_ENV" ]; then - if ! in_venv "$(command -v node)" || [ "$(node --version)" != "v${NODE_VERSION}" ]; then + if ! command -v node >/dev/null || [ "$(node --version)" != "v${NODE_VERSION}" ]; then echo "Installing node into $VIRTUAL_ENV with nodeenv." if [ -d "${VIRTUAL_ENV}/lib/node_modules" ]; then echo "Removing old ${VIRTUAL_ENV}/lib/node_modules directory."