8000 Fix net10.0 detection for osx-arm64 (#526) · dotnet/install-scripts@87151ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 87151ae

Browse files
authored
Fix net10.0 detection for osx-arm64 (#526)
* Fix net10.0 detection for osx-arm64
1 parent 033622c commit 87151ae

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/dotnet-install.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,17 @@ get_normalized_architecture_for_specific_sdk_version() {
423423
# args:
424424
# version or channel - $1
425425
is_arm64_supported() {
426-
#any channel or version that starts with the specified versions
427-
case "$1" in
428-
( "1"* | "2"* | "3"* | "4"* | "5"*)
429-
echo false
430-
return 0
426+
# Extract the major version by splitting on the dot
427+
major_version="${1%%.*}"
428+
429+
# Check if the major version is a valid number and less than 6
430+
case "$major_version" in
431+
[0-9]*)
432+
if [ "$major_version" -lt 6 ]; then
433+
echo false
434+
return 0
435+
fi
436+
;;
431437
esac
432438

433439
echo true

0 commit comments

Comments
 (0)
0