Skip to content

Commit

Permalink
init-distro-rid.sh: fix unbound error when VERSION_ID is not defined. (
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds authored Apr 25, 2023
1 parent 0fc8978 commit 5191a75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ getNonPortableDistroRid()
VERSION_ID="${VERSION_ID%.*}"
fi

if [[ "${VERSION_ID}" =~ ^([[:digit:]]|\.)+$ ]]; then
if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then
nonPortableRid="${ID}.${VERSION_ID}-${targetArch}"
else
# Rolling release distros either do not set VERSION_ID, set it as blank or
Expand Down

0 comments on commit 5191a75

Please sign in to comment.