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

Added missing quotes in WSL instructions #479

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

nimatt
Copy link
Contributor

@nimatt nimatt commented Oct 6, 2021

One of the commands for WSL configuration was missing quotes which resulted in invalid configuration.

One of the commands for WSL configuration was missing quotes which resulted in invalid configuration.
@derrickstolee
Copy link
Contributor

One of the commands for WSL configuration was missing quotes which resulted in invalid configuration.

The space in "Program Files" is guarded by a slash (\), so I don't see how this was a problem before.

However, using quotes is more idiomatic.

@vtbassmatt
Copy link
Contributor

With the " I guess we don't still need the \ before the space?

@nimatt
Copy link
Contributor Author

nimatt commented Oct 7, 2021

Actually both are required. When using only \ it does not get persisted in the git config

$ git config --global credential.helper /mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe
$ git config --global -l
credential.helper=/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe
...
$ git fetch
/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get: 1: /mnt/c/Program: not found
...

Using only " will have the same result

$ git config --global credential.helper "/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe"
$ git config --global -l
credential.helper=/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe
...
$ git fetch
/mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get: 1: /mnt/c/Program: not found
...

Only when using both we end up with the \ in the config and it starts working

$ git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe"
$ git config --global -l
credential.helper=/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe
...

@mjcheetham mjcheetham requested a review from dscho October 7, 2021 09:02
Copy link
Collaborator

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this!

@mjcheetham mjcheetham merged commit b4bf8ce into git-ecosystem:main Oct 7, 2021
@mjcheetham mjcheetham mentioned this pull request Oct 8, 2021
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

Successfully merging this pull request may close these issues.

4 participants