Repository navigation
Check for awk before resolving or downloading - #749
Open
celinhodaltro wants to merge 1 commit into
Open
celinhodaltro wants to merge 1 commit into
celinhodaltro wants to merge 1 commit into
Conversation
The script uses awk to parse the aka.ms redirect, the HTTP status codes, the Content-Length and the version in global.json. Images such as mcr.microsoft.com/azurelinux/core:4 do not ship awk, and the failure only surfaced deep inside the download as a shell error about a missing command. awk is now checked next to curl and wget, with the same kind of prerequisite message. Fix dotnet#746
xhxxx777
approved these changes
Nov 2, 2026
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.
Fixes #746.
dotnet-install.shsilently assumesawk: it parses the aka.ms redirect (get_download_link_from_aka_ms), the HTTP status codes (downloadcurl/downloadwget), theContent-Lengthand the SDK version inglobal.json. On an image without awk (mcr.microsoft.com/azurelinux/core:4, for example) the first confusing symptom is a shell error inside the download, long after the script has accepted the environment.check_min_reqsnow checks for awk right after curl/wget, so a missing prerequisite is reported once, up front.I checked where awk is used before adding a hard requirement: every download path parses HTTP codes or the redirect with it, and
--jsonfileneeds it to read the SDK version, so there is no meaningful install flow that can skip it.Verified
On a shell whose PATH has no awk:
With awk present, the same command still resolves:
ScriptEncodingTests(2/2) passes, so the line endings the repository requires (*.sh= LF) are intact.