Skip to content

Commit

Permalink
Apply fallback install on sh
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Aug 22, 2024
1 parent da436d8 commit 434df0a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,21 @@ function getLatestVersion () {
for index in "${LatestVersionMap[@]}"; do
if [ "${index%%=*}" = "${1}" ]; then
echo "${index#*=}"
return
fi
done
# return fallback version
local manifestId="$1"
local prefix="${manifestId%.*}"
local fallbackVersion=""
for entry in "${LatestVersionMap[@]}"; do
mapKey="${entry%%=*}"
mapValue="${entry#*=}"
if [[ "$mapKey" == "$prefix"* ]]; then
fallbackVersion="$mapValue"
fi
done
echo "$fallbackVersion"
}

# Check installed dotnet version
Expand Down

0 comments on commit 434df0a

Please sign in to comment.