Thanks to visit codestin.com
Credit goes to github.com

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
7 changes: 5 additions & 2 deletions clr_loader/util/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ def find_dotnet_root() -> str:
# On Windows, the host library is stored separately from dotnet.exe for x86
prog_files = os.environ.get("ProgramFiles")
dotnet_root = os.path.join(prog_files, "dotnet")
if os.path.isdir(dotnet_root):
return dotnet_root
elif sys.platform == "darwin":
dotnet_root = "/usr/local/share/dotnet"

if dotnet_root is not None and os.path.isdir(dotnet_root):
return dotnet_root

# Try to discover dotnet from PATH otherwise
dotnet_path = shutil.which("dotnet")
Expand Down