Skip to content

Cannot find dotnet root on x64 darwin #36

@LeeDongGeon1996

Description

@LeeDongGeon1996

The latest version of clr-loader finds the dotnet root with literal path string. It causes the problem on x64 darwin system, which dotnet root is /usr/local/share/dotnet/x64

Before on 0.1.7, it finds with which(dotnet) so there was no problem.
Could you have a look?

elif sys.platform == "darwin":
dotnet_root = Path("/usr/local/share/dotnet")

---Edited

With noted on Python documentation, I'd like to suggest to check whether the system is 64-bits or not.
https://docs.python.org/3/library/platform.html#cross-platform

    if:
        # Something
        pass
    elif sys.platform == "darwin":
        if sys.maxsize > 2**32: # is_64bits
            dotnet_root = Path("/usr/local/share/dotnet/x64")
        else:
            dotnet_root = Path("/usr/local/share/dotnet")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions