Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find dotnet root on x64 darwin #36

Closed
LeeDongGeon1996 opened this issue Oct 2, 2022 · 0 comments · Fixed by #37
Closed

Cannot find dotnet root on x64 darwin #36

LeeDongGeon1996 opened this issue Oct 2, 2022 · 0 comments · Fixed by #37

Comments

@LeeDongGeon1996
Copy link
Contributor

LeeDongGeon1996 commented Oct 2, 2022

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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant