Skip to content

Commit b732e7b

Browse files
authored
Improve an error message (#117)
* issue #27: improve an error message
1 parent 73abb65 commit b732e7b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/dotnet-install.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,9 @@ if (!$isAssetInstalled) {
871871
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
872872
}
873873

874+
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
874875
if (!$isAssetInstalled) {
876+
Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $DownloadLink.`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues."
875877
throw "`"$assetName`" with version = $SpecificVersion failed to install with an unknown error."
876878
}
877879

src/dotnet-install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,8 @@ install_dotnet() {
966966
return 0
967967
fi
968968
969+
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
970+
say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues."
969971
say_err "\`$asset_name\` with version = $specific_product_version failed to install with an unknown error."
970972
return 1
971973
}

0 commit comments

Comments
 (0)