fix var check

This commit is contained in:
aptalca 2025-12-31 11:57:11 -05:00
parent 09e367d3b3
commit 9fc167717d
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548

View File

@ -6,7 +6,7 @@ ARG MOD_VERSION
RUN \
DOTNET_JSON=$(curl -sX GET "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json") && \
if [ -z ${MOD_VERSION+x} ]; then \
if [ -z "${MOD_VERSION}" ]; then \
MOD_VERSION=$(echo "$DOTNET_JSON" | jq -r '."releases-index"[] | select(."support-phase"=="active" or ."support-phase"=="maintenance") | ."latest-sdk"' | tr '\n' '_' | head -c -1); \
fi && \
DOTNET_VERSIONS="${MOD_VERSION//_/ }" && \