From cbd294d8484c814da1e6c4eea1f2b932c9a58c3f Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Dec 2023 21:52:52 +0300 Subject: [PATCH] fixup! --- jfrog-oauth/run.sh | 5 +++++ jfrog-token/run.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/jfrog-oauth/run.sh b/jfrog-oauth/run.sh index ecb0a5c..ce5509f 100644 --- a/jfrog-oauth/run.sh +++ b/jfrog-oauth/run.sh @@ -32,6 +32,10 @@ email = ${ARTIFACTORY_EMAIL} registry = ${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM} EOF jf rt curl /api/npm/auth >> ~/.npmrc + # if npm version is greater than or equal to 9.0.0, use the new npmrc format + if [ "$(npm --version | cut -d. -f1)" -ge 9 ]; then + npm config fix + fi fi # Configure the `pip` to use the Artifactory "python" repository. @@ -59,6 +63,7 @@ echo "🥳 Configuration complete!" # Install the JFrog vscode extension for code-server. if [ "${CONFIGURE_CODE_SERVER}" == "true" ]; then while ! [ -x /tmp/code-server/bin/code-server ]; do + counter=0 if [ $counter -eq 30 ]; then echo "Timed out waiting for /tmp/code-server/bin/code-server to be installed." exit 1 diff --git a/jfrog-token/run.sh b/jfrog-token/run.sh index ecb0a5c..178cbdc 100644 --- a/jfrog-token/run.sh +++ b/jfrog-token/run.sh @@ -59,6 +59,7 @@ echo "🥳 Configuration complete!" # Install the JFrog vscode extension for code-server. if [ "${CONFIGURE_CODE_SERVER}" == "true" ]; then while ! [ -x /tmp/code-server/bin/code-server ]; do + counter=0 if [ $counter -eq 30 ]; then echo "Timed out waiting for /tmp/code-server/bin/code-server to be installed." exit 1