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

Invalid Directory Character Separator #25

Open
Migueton opened this issue Nov 6, 2019 · 0 comments
Open

Invalid Directory Character Separator #25

Migueton opened this issue Nov 6, 2019 · 0 comments

Comments

@Migueton
Copy link

Migueton commented Nov 6, 2019

Steps to reproduce

Install NuLink

$ dotnet tool install -g NuLink --version 0.1.0-beta2

Run the commands to link a package on MacOS

$ dotnet restore 
$ dotnet build 
$ nulink link -p NuLink.TestCase.FirstPackage -l “\PATH…\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj"

Expected result
The NuLink.TestCase.FirstPackage package linked to a local folder.

Actual result
It throws a "File does not exist" error. ParsedPath::ParsedPath(string path) in OldProjectStyle.cs uses Path.AltDirectorySeparatorChar to split paths on Windows style separarators, but it doesn't work on macOS (see this issue https://github.com/dotnet/corefx/issues/11529)

NuLink command line and output

 $ nulink link -p NuLink.TestCase.FirstPackage -l "\Users\user\Projects\NuLink Test\NuLink-master\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj"

Error: File does not exist: \Users\user\Projects\NuLink Test\NuLink-master\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj

Output of dotnet --info command

$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/3.0.100/

Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33

.NET Core SDKs installed:
2.1.701 [/usr/local/share/dotnet/sdk]
3.0.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Proposed solution
Hardcoding ‘\’ as an additional separator character for the path.Split call in ParsedPath::ParsedPath(string path).

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

No branches or pull requests

1 participant