@@ -489,7 +489,7 @@ get_specific_version_from_version() {
489
489
local json_file=" $5 "
490
490
491
491
if [ -z " $json_file " ]; then
492
- if [[ " $version " == " latest" ]]; then
492
+ if [[ " $version " == " latest" ]]; then
493
493
local version_info
494
494
version_info=" $( get_latest_version_info " $azure_feed " " $channel " " $normalized_architecture " false) " || return 1
495
495
say_verbose " get_specific_version_from_version: version_info=$version_info "
@@ -522,7 +522,7 @@ construct_download_link() {
522
522
local specific_version=" ${4// [$'\t\r\n']} "
523
523
local specific_product_version=" $( get_specific_product_version " $1 " " $4 " ) "
524
524
local osname=" $5 "
525
-
525
+
526
526
local download_link=null
527
527
if [[ " $runtime " == " dotnet" ]]; then
528
528
download_link=" $azure_feed /Runtime/$specific_version /dotnet-runtime-$specific_product_version -$osname -$normalized_architecture .tar.gz"
@@ -542,7 +542,7 @@ construct_download_link() {
542
542
# azure_feed - $1
543
543
# specific_version - $2
544
544
get_specific_product_version () {
545
- # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents
545
+ # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents
546
546
# to resolve the version of what's in the folder, superseding the specified version.
547
547
eval $invocation
548
548
@@ -753,9 +753,8 @@ download() {
753
753
elif machine_has " wget" ; then
754
754
downloadwget " $remote_path " " $out_path " || failed=true
755
755
else
756
- unset http_code
757
- download_error_msg=" Missing dependency: neither curl nor wget was found."
758
- break
756
+ say_err " Missing dependency: neither curl nor wget was found."
757
+ return 1
759
758
fi
760
759
761
760
if [ " $failed " = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = " 404" ]; }; then
@@ -905,10 +904,10 @@ install_dotnet() {
905
904
906
905
# The download function will set variables $http_code and $download_error_msg in case of failure.
907
906
download " $download_link " " $zip_path " 2>&1 || download_failed=true
908
- primary_path_http_code=" $http_code " ; primary_path_download_error_msg=" $download_error_msg "
909
907
910
908
# if the download fails, download the legacy_download_link
911
909
if [ " $download_failed " = true ]; then
910
+ primary_path_http_code=" $http_code " ; primary_path_download_error_msg=" $download_error_msg "
912
911
case $primary_path_http_code in
913
912
404)
914
913
say " The resource at $download_link is not available."
@@ -928,9 +927,9 @@ install_dotnet() {
928
927
929
928
# The download function will set variables $http_code and $download_error_msg in case of failure.
930
929
download " $download_link " " $zip_path " 2>&1 || download_failed=true
931
- legacy_path_http_code=" $http_code " ; legacy_path_download_error_msg=" $download_error_msg "
932
930
933
931
if [ " $download_failed " = true ]; then
932
+ legacy_path_http_code=" $http_code " ; legacy_path_download_error_msg=" $download_error_msg "
934
933
case $legacy_path_http_code in
935
934
404)
936
935
say " The resource at $download_link is not available."
@@ -1132,10 +1131,10 @@ do
1132
1131
echo " --arch,-Architecture,-Arch"
1133
1132
echo " Possible values: x64, arm, and arm64"
1134
1133
echo " --os <system> Specifies operating system to be used when selecting the installer."
1135
- echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
1136
- echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
1134
+ echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
1135
+ echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
1137
1136
echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links."
1138
- echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information."
1137
+ echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information."
1139
1138
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
1140
1139
echo " -Runtime"
1141
1140
echo " Possible values:"
1160
1159
echo " Installs just the shared runtime bits, not the entire SDK."
1161
1160
echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
1162
1161
echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1.
1163
- echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
1162
+ echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
1164
1163
echo " "
1165
1164
echo " Install Location:"
1166
1165
echo " Location is chosen in following order:"
@@ -1197,7 +1196,7 @@ if [ "$dry_run" = true ]; then
1197
1196
if [ " $valid_legacy_download_link " = true ]; then
1198
1197
say " Legacy named payload URL: $legacy_download_link "
1199
1198
fi
1200
- repeatable_command=" ./$script_name --version " \" " $specific_version " \" " --install-dir " \" " $install_root " \" " --architecture " \" " $normalized_architecture " \" " --os " \" " $normalized_os " \" " "
1199
+ repeatable_command=" ./$script_name --version " \" " $specific_version " \" " --install-dir " \" " $install_root " \" " --architecture " \" " $normalized_architecture " \" " --os " \" " $normalized_os " \" " "
1201
1200
if [[ " $runtime " == " dotnet" ]]; then
1202
1201
repeatable_command+=" --runtime " \" " dotnet" \" " "
1203
1202
elif [[ " $runtime " == " aspnetcore" ]]; then
0 commit comments