build.sh SDK bootstrap tells you what's actually missing - #2118
Merged
Conversation
NickJosevski
force-pushed
the
nj/build-sh-bootstrap-diagnostics
branch
2 times, most recently
from
August 6, 2026 07:10
7af87ed to
c86d38c
Compare
NickJosevski
marked this pull request as draft
August 6, 2026 08:16
NickJosevski
marked this pull request as ready for review
August 6, 2026 08:42
zentron
approved these changes
Aug 7, 2026
zentron
left a comment
Contributor
There was a problem hiding this comment.
nice, ive seen that once or twice before but not spent enough time looking at it. Thanks Claude @NickJosevski
…nd perl build.sh uses the machine's dotnet if `dotnet --version` succeeds, and otherwise downloads an SDK. That fallback shells out to curl and perl, neither of which is guaranteed in our Linux execution containers, so the first symptom is an opaque `exit 127` from a missing tool. That misleads twice over: reaching the fallback at all means `dotnet --version` failed, which is almost always global.json pinning an SDK the machine does not have. The "command not found" points away from the cause. - Log why the bootstrap ran, and list the SDKs that are installed - Use wget when curl is absent; name the problem when neither exists - Use sed when perl is absent Verified with the SDK install stubbed, in the containers that actually broke: amazonlinux:2 (curl, no perl) and debian:12 +wget (no curl) now complete the bootstrap instead of exiting 127; with neither downloader present it fails with a named error; and SDK 8 against a global.json pinning 10.0.302 now reports "global.json likely pins an SDK that is not installed (found: 8.0.423)". The sed fallback returns 8.0.419 for this repo's global.json, matching perl. A machine that already satisfies global.json still skips the bootstrap entirely. Deliberately out of scope: the hardcoded DOTNET_CHANNEL="8.0" (belongs with the .NET 10 work), and build.ps1 (Windows ships curl.exe and needs no perl). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
NickJosevski
force-pushed
the
nj/build-sh-bootstrap-diagnostics
branch
from
August 7, 2026 01:58
c86d38c to
7cf717b
Compare
NickJosevski
enabled auto-merge
August 7, 2026 01:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
build.shuses the machine'sdotnetifdotnet --versionsucceeds, and otherwise downloads anSDK. That fallback shells out to curl and perl.
Neither is guaranteed in our Linux containers, so you get:
Changes
wgetwhen nocurl==> or says if can't find eithersedwhen noperlTesting
amazonlinux:2(curl, no perl)perl: command not found, exit 127debian:12+ wget (no curl)curl: command not found, exit 127curl: command not found, exit 127Unable to download … - neither curl nor wget is available, exit 1global.jsonpins10.0.302'dotnet --version' failed - global.json likely pins an SDK that is not installed (found: 8.0.423)🤖 Generated with Claude Code