parent
baa5083c63
commit
20fbf9f2e4
2 changed files with 14 additions and 0 deletions
7
scripts/obtain/dotnet-install.ps1
vendored
7
scripts/obtain/dotnet-install.ps1
vendored
|
@ -522,6 +522,7 @@ else {
|
|||
throw "Invalid value for `$Runtime"
|
||||
}
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
||||
if ($isAssetInstalled) {
|
||||
Say "$assetName version $SpecificVersion is already installed."
|
||||
|
@ -561,6 +562,12 @@ catch {
|
|||
Say "Extracting zip from $DownloadLink"
|
||||
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
|
||||
|
||||
# Check if the SDK version is now installed; if not, fail the installation.
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
||||
if (!$isAssetInstalled) {
|
||||
throw "$assetName version $SpecificVersion failed to install with an unknown error."
|
||||
}
|
||||
|
||||
Remove-Item $ZipPath
|
||||
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
|
||||
|
|
7
scripts/obtain/dotnet-install.sh
vendored
7
scripts/obtain/dotnet-install.sh
vendored
|
@ -754,6 +754,7 @@ install_dotnet() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
|
||||
say "$asset_name version $specific_version is already installed."
|
||||
return 0
|
||||
|
@ -791,6 +792,12 @@ install_dotnet() {
|
|||
say "Extracting zip from $download_link"
|
||||
extract_dotnet_package "$zip_path" "$install_root"
|
||||
|
||||
# Check if the SDK version is now installed; if not, fail the installation.
|
||||
if ! is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
|
||||
say_err "$asset_name version $specific_version failed to install with an unknown error."
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue