From 2a120d69c146c1359c6adc116e1571081e948dee Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Mon, 26 Jul 2021 15:47:26 +0200 Subject: [PATCH] fix: ensure registry URL is defined and not exit on error It avoids CrashLoopBackedOff if for some reason it's not set Change-Id: Ibee32589402fd327d8c6af590499aaf8d1b0898f Signed-off-by: Florent Benoit --- dockerfiles/theia-vsix-installer/src/entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockerfiles/theia-vsix-installer/src/entrypoint.sh b/dockerfiles/theia-vsix-installer/src/entrypoint.sh index afc54b260..d872f05a0 100755 --- a/dockerfiles/theia-vsix-installer/src/entrypoint.sh +++ b/dockerfiles/theia-vsix-installer/src/entrypoint.sh @@ -23,6 +23,11 @@ for container in $(echo "$WORKSPACE" | sed -e 's|[[,]\({"attributes":{"app.kuber # check if URL starts with relative:extension/ # example of url: "relative:extension/resources/download_jboss_org/jbosstools/static/jdt_ls/stable/java-0.75.0-60.vsix if [[ "$url" =~ ^relative:extension/.* ]]; then + # if there is no CHE_PLUGIN_REGISTRY_URL env var, skip + if [ -z "${CHE_PLUGIN_REGISTRY_URL}" ]; then + echo "CHE_PLUGIN_REGISTRY_URL env var is not set, skipping relative url ${url}" + continue + fi # update URL by using the Plugin Registry URL as prefix url=${CHE_PLUGIN_REGISTRY_URL}/${url#relative:extension/} fi