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

NuGet update failes when project path contains spaces. #8633

Closed
TomW-Skyline opened this issue Dec 16, 2023 · 7 comments · Fixed by #8695 or #9092
Closed

NuGet update failes when project path contains spaces. #8633

TomW-Skyline opened this issue Dec 16, 2023 · 7 comments · Fixed by #8695 or #9092
Labels
good first issue L: dotnet:nuget NuGet packages via nuget or dotnet

Comments

@TomW-Skyline
Copy link
Contributor

The command arguments need to be surrounded by quotes, because otherwise there are problems when they contain spaces.

@TomW-Skyline
Copy link
Contributor Author

This is still not working as expected unfortunately

@abdulapopoola
Copy link
Member

Sorry to hear that; will reopen the issue and tagging @brettfo for awareness

@abdulapopoola abdulapopoola reopened this Feb 20, 2024
@brettfo
Copy link
Contributor

brettfo commented Feb 20, 2024

@TomW-Skyline Do you have a recent log file you can share? There are likely more places we need to surround arguments.

@TomW-Skyline
Copy link
Contributor Author

@brettfo here is an example:
updater | running NuGet updater:
updater | /opt/nuget/NuGetUpdater/NuGetUpdater.Cli update --repo-root /home/dependabot/dependabot-updater/repo --solution-or-project /home/dependabot/dependabot-updater/repo/ResourceScheduling_Add\ Contact\ To\ Job_1/ResourceScheduling_Add\ Contact\ To\ Job_1.csproj --dependency Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit --new-version 8.0.1 --previous-version 7.0.2 --verbose
updater | 2024/02/20 09:16:34 ERROR <job_789283670> Block argument of NuGetConfigCredentialHelpers::patch_nuget_config_for_action causes an exception Unrecognized command or argument 'Contact'.
updater | Unrecognized command or argument 'To'.
updater | Unrecognized command or argument 'Job_1/ResourceScheduling_Add'.
updater | Unrecognized command or argument 'Contact'.
updater | Unrecognized command or argument 'To'.
updater | Unrecognized command or argument 'Job_1.csproj'.
updater |
updater | Description:
updater | Applies the changes from an analysis report to update a dependency.
updater |

@brettfo
Copy link
Contributor

brettfo commented Feb 21, 2024

@TomW-Skyline Added PR #9092 to allow proper execution of the tool with spaces in the command line.

@TomW-Skyline
Copy link
Contributor Author

@brettfo That's great! There is probably no easy way to already test it?

@brettfo
Copy link
Contributor

brettfo commented Feb 22, 2024

@TomW-Skyline I created a repo with a space in the path and did a full dependabot update run to verify the path fix. I've also just submitted #9104 which will fail a unit test on a malformed path so we can detect this faster.

Laptop765 added a commit to Laptop765/dependabot-core that referenced this issue Oct 30, 2024
This probably doesn't entirely address dependabot#10527 but may be related. See also dependabot#8633.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
5 participants
@abdulapopoola @jakecoffman @brettfo @TomW-Skyline and others