Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix macOS dotnet root discovery
  • Loading branch information
filmor committed Jan 3, 2023
commit c9a6ac8e8227824af1175d9e5b180f2aa516a7f3
5 changes: 3 additions & 2 deletions clr_loader/util/find.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import os.path
import platform
import shutil
import sys
from pathlib import Path
Expand Down Expand Up @@ -42,7 +42,8 @@ def find_dotnet_root() -> Path:
prog_files = Path(prog_files)
dotnet_root = prog_files / "dotnet"
elif sys.platform == "darwin":
if sys.maxsize > 2**32: # is_64bits
if "ARM64" in os.uname().version and platform.machine() == "x86_64":
# Apple Silicon in Rosetta 2 mode
dotnet_root = Path("/usr/local/share/dotnet/x64")
else:
dotnet_root = Path("/usr/local/share/dotnet")
Expand Down