Unverified Commit 62497462 authored by Nicola Soranzo's avatar Nicola Soranzo
Browse files

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
parent eb36c377
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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."