Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
fix: ensure registry URL is defined and not exit on error
Browse files Browse the repository at this point in the history
It avoids CrashLoopBackedOff if for some reason it's not set

Change-Id: Ibee32589402fd327d8c6af590499aaf8d1b0898f
Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf committed Jul 26, 2021
1 parent c570447 commit 2a120d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dockerfiles/theia-vsix-installer/src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a120d6

Please sign in to comment.