mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Update Linux installer
This commit is contained in:
parent
ce38f90a9a
commit
3c80e97cbd
9
externals/install-dotnet.sh
vendored
9
externals/install-dotnet.sh
vendored
@ -753,9 +753,8 @@ download() {
|
|||||||
elif machine_has "wget"; then
|
elif machine_has "wget"; then
|
||||||
downloadwget "$remote_path" "$out_path" || failed=true
|
downloadwget "$remote_path" "$out_path" || failed=true
|
||||||
else
|
else
|
||||||
unset http_code
|
say_err "Missing dependency: neither curl nor wget was found."
|
||||||
download_error_msg="Missing dependency: neither curl nor wget was found."
|
exit 1
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then
|
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then
|
||||||
@ -905,10 +904,10 @@ install_dotnet() {
|
|||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||||
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
|
||||||
|
|
||||||
# if the download fails, download the legacy_download_link
|
# if the download fails, download the legacy_download_link
|
||||||
if [ "$download_failed" = true ]; then
|
if [ "$download_failed" = true ]; then
|
||||||
|
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
||||||
case $primary_path_http_code in
|
case $primary_path_http_code in
|
||||||
404)
|
404)
|
||||||
say "The resource at $download_link is not available."
|
say "The resource at $download_link is not available."
|
||||||
@ -928,9 +927,9 @@ install_dotnet() {
|
|||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||||
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
|
||||||
|
|
||||||
if [ "$download_failed" = true ]; then
|
if [ "$download_failed" = true ]; then
|
||||||
|
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
||||||
case $legacy_path_http_code in
|
case $legacy_path_http_code in
|
||||||
404)
|
404)
|
||||||
say "The resource at $download_link is not available."
|
say "The resource at $download_link is not available."
|
||||||
|
Loading…
Reference in New Issue
Block a user