Skip to content

Commit 205bea6

Browse files
authored
Fix Fedora version check when VERSION_ID is decimal (#2549)
This fixes RHEL builds where VERSION_ID=7.9
2 parents 5693b62 + 72aae41 commit 205bea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/ruby-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ is_fedora() {
211211
# shellcheck disable=SC1091
212212
source /etc/os-release
213213
# Treat Aurora, Bazzite, BlueFin, uCore, and other Fedora variants as "fedora".
214-
if [[ "${ID_LIKE:-$ID}" != "fedora" || ( $# -gt 0 && "$VERSION_ID" -lt "$1") ]]; then
214+
if [[ "${ID_LIKE:-$ID}" != "fedora" || ( $# -gt 0 && "${VERSION_ID%%.*}" -lt "$1") ]]; then
215215
return 1
216216
fi
217217
}

0 commit comments

Comments
 (0)