You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
We are happy that we found this tool. Our system configuration is special, so we encountered a rare error.
Our internal Nuget-Feed Link (e.g. http:\tfs.local\Our%20Solution_packaging/our-Feed/nuget/v3/index.json) contains a space.
In line 36 (DotNetUpdatePackageCommand.cs) NuKeeper cut the Url in two parts (e.g. http:\tfs.local\Our Solution_packaging/our-Feed/nuget/v3/index.json) while executing "dotnet add" command.
here is the part of the log (--verbosity D) before the exception is thrown: Nuget restore on local.project.TestConsole.csproj complete In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet restore local.project.TestConsole.csproj -s http://tfs.local/Our%20Solution/_packaging/our-Feed/nuget/v3/index.json In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet remove local.project.TestConsole.csproj package local.package In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet add local.project.TestConsole.csproj package local.package -v 1.0.4.209 -s http://tfs.local/Our Solution/_packaging/our-Feed/nuget/v3/index.json
Expected behavior
To add in line 36 masked quotes for parameter "-s"
What's interesting is that the dotnet restore part escapes the url. I assume that the %20 escaping there is correct and can be applied to the dotnet add part as well?
Although, the issue is really with a command-line param containing a space, so quoting it with " " seems a more accurate fix.
* Escape uris that contain spaces
cannot apply Uri.EscapeUriString blinbdly, or it will double-escape already escaped strings
For #942
* escape with ""
* Use `ArgumentEscaper.EscapeAndConcatenate` which will wrap in quotes if need be
And is generally more detailed and robust than what I did
see https://github.com/natemcmaster/CommandLineUtils/blob/master/src/CommandLineUtils/Utilities/ArgumentEscaper.cs
Co-authored-by: Anthony Steele <anthony.steele@pockit.com>
🐛 Bug Report
We are happy that we found this tool. Our system configuration is special, so we encountered a rare error.
Our internal Nuget-Feed Link (e.g. http:\tfs.local\Our%20Solution_packaging/our-Feed/nuget/v3/index.json) contains a space.
In line 36 (DotNetUpdatePackageCommand.cs) NuKeeper cut the Url in two parts (e.g. http:\tfs.local\Our Solution_packaging/our-Feed/nuget/v3/index.json) while executing "dotnet add" command.
here is the part of the log (--verbosity D) before the exception is thrown:
Nuget restore on local.project.TestConsole.csproj complete In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet restore local.project.TestConsole.csproj -s http://tfs.local/Our%20Solution/_packaging/our-Feed/nuget/v3/index.json In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet remove local.project.TestConsole.csproj package local.package In path C:\tfs\OurSolution\local.project\Development\local.project.TestConsole, running command: dotnet add local.project.TestConsole.csproj package local.package -v 1.0.4.209 -s http://tfs.local/Our Solution/_packaging/our-Feed/nuget/v3/index.json
Expected behavior
To add in line 36 masked quotes for parameter "-s"
e.g. dotnet add local.project.TestConsole.csproj package local.package -v 1.0.4.209 -s "http://tfs.local/Our Solution/_packaging/our-Feed/nuget/v3/index.json"
The text was updated successfully, but these errors were encountered: