Skip to content

Commit

Permalink
Fail if maximum attempts is reached.
Browse files Browse the repository at this point in the history
  • Loading branch information
SDawley committed Jul 20, 2023
1 parent f3a829d commit 489bfee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/dockerfiles/import-vsix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ getMetadata(){
vsixMetadata=$(curl -sLS "https://open-vsx.org/api/${vsixName}/${key}")
if [[ $(echo "${vsixMetadata}" | jq -r ".error") != null ]]; then
echo "Attempt $j/5: Error while getting metadata for ${vsixName} version ${key}"

if [[ $j = 5 ]]; then
echo "[ERROR] Maximum attempts reached."
exit 1
fi
continue
else
break
Expand Down

0 comments on commit 489bfee

Please sign in to comment.