Add apk fallback for native dotnet deps on musl/Alpine runners
dotnet-install.sh silently picks the linux-musl-x64 SDK on this runner, which has no apt-get - only apk - so the previous apt-only fix still failed.
This commit is contained in:
@@ -65,15 +65,20 @@ ensure_dotnet_native_deps() {
|
||||
fi
|
||||
|
||||
log "libstdc++.so.6 missing; installing native runtime deps for dotnet"
|
||||
if command -v apt-get > /dev/null 2>&1; then
|
||||
local sudo_cmd=""
|
||||
if [[ "$(id -u)" -ne 0 ]] && command -v sudo > /dev/null 2>&1; then
|
||||
sudo_cmd="sudo"
|
||||
fi
|
||||
|
||||
if command -v apt-get > /dev/null 2>&1; then
|
||||
$sudo_cmd apt-get update -y
|
||||
$sudo_cmd apt-get install -y --no-install-recommends libstdc++6 libgcc-s1 libicu-dev ca-certificates
|
||||
elif command -v apk > /dev/null 2>&1; then
|
||||
# Alpine/musl runner - dotnet-install.sh falls back to the linux-musl-x64 SDK
|
||||
# here, which still wants a real libstdc++/libgcc (not just gcompat).
|
||||
$sudo_cmd apk add --no-cache libstdc++ libgcc icu-libs ca-certificates
|
||||
else
|
||||
fail "libstdc++.so.6 missing and apt-get unavailable; install a C++ runtime manually on this runner"
|
||||
fail "libstdc++.so.6 missing and neither apt-get nor apk is available; install a C++ runtime manually on this runner"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user