From 1c9fb2b9c240e4278869a25080b5697daa09ddf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcelo=20Daltro=20Marques?= Date: Sat, 31 Oct 2026 16:57:21 -0300 Subject: [PATCH] Check for awk before resolving or downloading 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 #746 --- src/dotnet-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dotnet-install.sh b/src/dotnet-install.sh index bd13ffa66..83da71eae 100755 --- a/src/dotnet-install.sh +++ b/src/dotnet-install.sh @@ -240,6 +240,12 @@ check_min_reqs() { say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed." return 1 fi + + # awk parses the redirect and status codes of the download, the aka.ms link and the version in global.json + if ! machine_has "awk"; then + say_err "awk is required to download and install dotnet. Install awk (for example the 'gawk' or 'mawk' package) and try again." + return 1 + fi return 0 }