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

Commit

Permalink
fix(vsix-installer): Should handle relative URLs
Browse files Browse the repository at this point in the history
eclipse-che/che#20198

Change-Id: I79f8c23ccf7e7b89fdb9a732c3e1814e99bdac20
Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf committed Jul 26, 2021
1 parent f2653d9 commit c570447
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dockerfiles/theia-vsix-installer/src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ for container in $(echo "$WORKSPACE" | sed -e 's|[[,]\({"attributes":{"app.kuber
mkdir -p "$dest"
unset IFS
for url in $(echo "$urls" | sed 's/[",]/ /g' - ); do
# 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
# update URL by using the Plugin Registry URL as prefix
url=${CHE_PLUGIN_REGISTRY_URL}/${url#relative:extension/}
fi
echo; echo "downloading $urls to $dest"
curl -L "$url" > "$dest/$(basename "$url")"
done
Expand Down

0 comments on commit c570447

Please sign in to comment.