Registry Mirror
Skip to content

dotnet-install.sh: line 1172: http_code: unbound variable #626

Closed

Description

@akoeplinger

Happened in https://dev.azure.com/dnceng-public/public/_build/results?buildId=1103973&view=logs&j=269f5d52-982b-5966-fca9-1b2b0a5feb6e&t=5635d2d0-8bb9-5f32-5791-31370b616264&l=3746 / dotnet/runtime#118278

From looking at the code this can happen if the timeout case occurs because then we don't set the http_code variable:

# Check for curl timeout codes
if [[ $curl_exit_code == 7 || $curl_exit_code == 28 ]]; then
download_error_msg+=" Failed to reach the server: connection timeout."
else
local disable_feed_credential=false
local response=$(get_http_header_curl $remote_path $disable_feed_credential)
http_code=$( echo "$response" | awk '/^HTTP/{print $2}' | tail -1 )
if [[ ! -z $http_code && $http_code != 2* ]]; then
download_error_msg+=" Returned HTTP status code: $http_code."
fi
fi

Activity

  1. added
    untriaged
    on Aug 8, 2025
  2. removed
    untriaged
    on Aug 13, 2025
  3. self-assigned this
    on Aug 13, 2025
  4. removed theissue type on Aug 13, 2025
  5. added theissue type on Aug 13, 2025
  6. moved this from Backlog to In Progress in .NET Install Scriptson Aug 25, 2025
  7. ellahathaway commented on Sep 17, 2025

    @ellahathaway
    Member

    Reopening this issue until the fix in #630 rolls out.

  8. moved this from Done to Rollout in .NET Install Scriptson Sep 17, 2025
  9. ellahathaway commented on Oct 21, 2025

    @ellahathaway
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions