Skip to content

Commit

Permalink
Fix shellcheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SDawley committed Jul 17, 2023
1 parent 8afc672 commit 703f5cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build/dockerfiles/import-vsix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ getMetadata(){
key=$2

# check there is no error field in the metadata and retry if there is
max_attempts=5
for i in 1 2 3 4 5
do
vsixMetadata=$(curl -sLS "https://open-vsx.org/api/${vsixName}/${key}")
Expand Down Expand Up @@ -86,7 +85,7 @@ for i in $(seq 0 "$((numberOfExtensions - 1))"); do
# grab metadata for the vsix file
# if version wasn't set, use latest
if [[ $vsixVersion == null ]]; then
getMetadata $vsixName "latest"
getMetadata "${vsixName}" "latest"
# if version wasn't set in json, grab it from metadata and add it into the file
# get all versions of the extension
allVersions=$(echo "${vsixMetadata}" | jq -r '.allVersions')
Expand All @@ -96,7 +95,7 @@ for i in $(seq 0 "$((numberOfExtensions - 1))"); do
resultedVersion=null
while IFS=$'\t' read -r key value; do
# get metadata for the version
getMetadata $vsixName $key
getMetadata "${vsixName}" "${key}"

# check if the version is pre-release
preRelease=$(echo "${vsixMetadata}" | jq -r '.preRelease')
Expand Down Expand Up @@ -132,7 +131,7 @@ for i in $(seq 0 "$((numberOfExtensions - 1))"); do
vsixVersion=$resultedVersion
fi
else
getMetadata $vsixName $vsixVersion
getMetadata "${vsixName}" "${vsixVersion}"
fi

# extract the download link from the json metadata
Expand Down

0 comments on commit 703f5cc

Please sign in to comment.