From a10d2c51d3e29ceef17b056992f04f98b0f8472c Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 18 Jan 2019 11:54:59 -0500 Subject: [PATCH] Add/pin configurable node version to 18.09. Backport/tweak of https://github.com/galaxyproject/galaxy/pull/7220) --- scripts/common_startup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/common_startup.sh b/scripts/common_startup.sh index ff9f853bdbf..600805fce3b 100755 --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -18,6 +18,7 @@ CREATE_VENV=1 REPLACE_PIP=$SET_VENV COPY_SAMPLE_FILES=1 SKIP_CLIENT_BUILD=${GALAXY_SKIP_CLIENT_BUILD:-0} +NODE_VERSION=${GALAXY_NODE_VERSION:-"9.11.1"} for arg in "$@"; do [ "$arg" = "--skip-eggs" ] && FETCH_WHEELS=0 @@ -223,9 +224,9 @@ fi if [ $SKIP_CLIENT_BUILD -eq 0 ]; then # Ensure dependencies are installed if [ -n "$VIRTUAL_ENV" ]; then - if ! in_venv "$(command -v node)"; then + if ! in_venv "$(command -v node)" || [ "$(node --version)" != "v$NODE_VERSION" ]; then echo "Installing node into $VIRTUAL_ENV with nodeenv." - nodeenv -n 9.11.1 -p + nodeenv -n $NODE_VERSION -p fi if ! in_venv "$(command -v yarn)"; then echo "Installing yarn into $VIRTUAL_ENV with npm."