pythonnet / clr-loader

Loader for different .NET runtimes
MIT License
32 stars 23 forks source link

dotnet_root detection broke in ubuntu 22.04 #30

Closed sensokame closed 2 years ago

sensokame commented 2 years ago

basically dotnet_root detection is returning /etc/alternatives as root, because this is the folder where /usr/bin/dotnet is linking to but the actual dotnet_root folder is /usr/lib/dotnet/dotnet6-6.0.108 so I believe the detection function should be updated to account for this.

Note: Setting DOTNET_ROOT environment variable to /usr/lib/dotnet/dotnet6-6.0.108 is a valid workaround, so this is not an urgent issue.

filmor commented 2 years ago

The issue is simply that os.readlink behaves slightly different than /bin/readlink in that it doesn't recursively discovers links. I'm currently refactoring some things, this will be included in the next release.