From 0c7aa24fd3ae42a37ef99283bcc0a03c747cdd6f Mon Sep 17 00:00:00 2001 From: Mathiyarasy <157102811+Mathiyarasy@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:31:39 +0000 Subject: [PATCH] Remove unbound variable --- src/oryx/install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/oryx/install.sh b/src/oryx/install.sh index a1353b6a6..c14bcacc1 100755 --- a/src/oryx/install.sh +++ b/src/oryx/install.sh @@ -235,7 +235,11 @@ if [[ "${PINNED_SDK_VERSION}" != "" ]]; then rm -f ${GIT_ORYX}/global.json rm -rf /usr/share/dotnet/sdk/$PINNED_SDK_VERSION NEW_RUNTIME_VERSIONS=$(dotnet --list-runtimes | awk '{print $2}' | sort | uniq) - SDK_INSTALLED_RUNTIME=$(echo "$NEW_RUNTIME_VERSIONS" | grep -vxFf <(echo "$RUNTIME_VERSIONS")) + if [ -n "${RUNTIME_VERSIONS:-}" ]; then + SDK_INSTALLED_RUNTIME=$(echo "$NEW_RUNTIME_VERSIONS" | grep -vxFf <(echo "$RUNTIME_VERSIONS")) + else + SDK_INSTALLED_RUNTIME=$(echo "$NEW_RUNTIME_VERSIONS") + fi rm -rf /usr/share/dotnet/shared/Microsoft.NETCore.App/$SDK_INSTALLED_RUNTIME rm -rf /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$SDK_INSTALLED_RUNTIME rm -rf /usr/share/dotnet/templates/$SDK_INSTALLED_RUNTIME