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

Execution fails if using WSL and username contains spaces #194

Closed
socram8888 opened this issue May 11, 2022 · 0 comments · Fixed by #195
Closed

Execution fails if using WSL and username contains spaces #194

socram8888 opened this issue May 11, 2022 · 0 comments · Fixed by #195
Labels

Comments

@socram8888
Copy link
Contributor

Describe the Bug

The execution currently fails if using WSL and the username contains spaces. This is due to improper escaping of space characters in GitExe and CygPathExe.

Steps to Reproduce

  1. Create a Windows username with spaces on the name, so its .nuget folder is in a path that contains spaces, such as C:\Users\Example User\.nuget\packages\gitinfo\2.2.0\build.
  2. Attempt to run a project that has GitInfo setup.

On the output console the following will be displayed:

4>"C:\Users\Example" is not recognized as an internal or external command,
4>operable program or batch file.
4>C:\Users\Example User\.nuget\packages\gitinfo\2.2.0\build\GitInfo.targets(1088,3): warning MSB3073: Command "..." exited with error code 9009.
4>"--version" is not recognized as an internal or external command,
4>operable program or batch file.
4>C:\Users\Example User\.nuget\packages\gitinfo\2.2.0\build\GitInfo.targets(203,3): warning MSB3073: Command "..." exited with error code 9009.
4>C:\Users\Example User\.nuget\packages\gitinfo\2.2.0\build\GitInfo.targets(212,3): error : Failed to run `git --version`. Git may not be properly installed: 
4>C:\Users\Example User\.nuget\packages\gitinfo\2.2.0\build\GitInfo.targets(212,3): error :  "--version" is not recognized as an internal or external command,;operable program or batch file.

Expected Behavior

GitInfo should run just fine.

Version Info

Present in latest 2.2.0

@socram8888 socram8888 added the bug label May 11, 2022
@kzu kzu closed this as completed in #195 Nov 16, 2022
@devlooped devlooped locked and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant