Skip to content

Commit

Permalink
Update .NET install SH script (again) (actions#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliobbv authored Dec 4, 2019
1 parent cd2cec8 commit 56e18f3
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/Misc/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -855,30 +855,26 @@ install_dotnet() {
extract_dotnet_package "$zip_path" "$install_root"
# Check if the SDK version is installed; if not, fail the installation.
is_asset_installed=false
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
if [[ $specific_version == *"rtm"* || $specific_version == *"servicing"* ]]; then
IFS='-'
read -ra verArr <<< "$specific_version"
release_version="${verArr[0]}"
unset IFS;
say_verbose "Checking installation: version = $release_version"
is_asset_installed="$(is_dotnet_package_installed "$install_root" "$asset_relative_path" "$release_version")"
fi
# Check if the SDK version is installed.
if [ "$is_asset_installed" = false ]; then
say_verbose "Checking installation: version = $specific_version"
is_asset_installed="$(is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version")"
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$release_version"; then
return 0
fi
fi
if [ "$is_asset_installed" = false ]; then
say_err "\`$asset_name\` with version = $specific_version failed to install with an unknown error."
return 1
# Check if the standard SDK version is installed.
say_verbose "Checking installation: version = $specific_version"
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
return 0
fi
return 0
say_err "\`$asset_name\` with version = $specific_version failed to install with an unknown error."
return 1
}
args=("$@")
Expand Down

0 comments on commit 56e18f3

Please sign in to comment.