aboutcode-org / nuget-inspector

Inspect and resolve .NET and NuGet package dependencies like dotnet and nuget do. Fetch manifests data. Runs on Linux, Windows and macOS as a standalone application.
https://github.com/nexB/nuget-inspector
4 stars 4 forks source link

Wrong resolution of home directory #52

Open georg-eckert-zeiss opened 4 months ago

georg-eckert-zeiss commented 4 months ago

Using ~ to reference the home directory leads to a wrongly resolved file path when calling nuget-inspector.

I call ni using this command:

nuget-inspector --project-file=~/dev/MyProject/MySolution.sln

which leads to this error:

ERROR: scan failed:  System.IO.DirectoryNotFoundException: Could not find a part of the path
  '/home/myuser/~/dev/MyProject/MySolution.sln

Obviously the current directory is simply prepended to the given path but ~ is ignored although resolving it would give an absolute path already.

Best regards.