Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Handle missing VERSION_ID gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
juergenhoetzel committed Jun 7, 2017
1 parent defa3c3 commit 8be34a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/obtain/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ 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
fi
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
}

Expand Down

0 comments on commit 8be34a6

Please sign in to comment.