From 8be34a6d9b48f69e33d6405d062b7ae2cd076812 Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Mon, 29 May 2017 18:31:00 +0200 Subject: [PATCH] Handle missing VERSION_ID gracefully --- scripts/obtain/dotnet-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 83ad96d17d3..44903061bab 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -139,7 +139,7 @@ get_distro_specific_os_name() { else if [ -e /etc/os-release ]; then . /etc/os-release - os=$(get_os_download_name_from_platform "$ID.$VERSION_ID" || echo "") + os=$(get_os_download_name_from_platform "$ID.${VERSION_ID:-}" || echo "") if [ -n "$os" ]; then echo "$os" return 0 @@ -147,7 +147,7 @@ get_distro_specific_os_name() { fi fi - say_err "OS name could not be detected: $ID.$VERSION_ID" + say_err "OS name could not be detected: $ID.${VERSION_ID:-UNDEFINED}" return 1 }