-
Notifications
You must be signed in to change notification settings - Fork 4
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
Extension clobbers global gitconfig setting #10
Comments
Thanks for reporting this! What is the expected value of What is your suggestion to fix this? |
So, the value in the .gitconfig file has Screenshot below illustrates this as well as issue with My suggestion is to replace single I'm not really familiar with JavaScript or TypeScript or else, I would have happily submitted a PR to fix this 😀 Thank you for making such a great extension that I use daily! |
This cannot be the issue. When you provide a string literal in JS, you just have to double enquote I.e. |
Yes, you are right. I should have been more specific saying that single For example,
Solution is to replace single |
I have the same issue. Even when I'm editing @hediet, I think the issue comes down to
So solution would be:
$ node
Welcome to Node.js v18.2.0.
Type ".help" for more information.
> const { promisify } = require('util');
undefined
> const { exec } = require('child_process');
undefined
> const { stdout } = await promisify(exec)(
... "git config --get core.excludesfile"
... )
undefined
> stdout
'~/.gitignore\n'
> I'm familiar with python, so will write an example using it, however same applies to JS, AFAIK. When you hardcode strings, you have to escape certain characters because they would be replaced by interpreter otherwise: var = "C:\\program files\\notepad++"
print(var) # C:\program files\notepad++ But when you're dealing with input, you don't have to worry about, say, var = input()
print(var) # C:\program files\notepad++ |
@Bobronium thanks for your analysis, can you do a PR? :) |
Thanks for the primer on escaping, @Bobronium. I understand how escaping works but not how it is done in JS/TS 😃 A PR to fix this would be great. |
There is one! |
Awesome 👍
…On Mon, Aug 15, 2022, 9:15 AM Arseny Boykov ***@***.***> wrote:
A PR to fix this would be great.
There is one!
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVJQJ7LXXFNKQJNTCA7KV3VZJNHPANCNFSM5OBGMNQQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I was wondering why the
core.excludesFile
setting in my global .gitconfig file was getting clobbered and I tracked it down to this.I had the value in the file set to
C:\\users\\ajay\\.gitconfig
.git config --get core.excludesFile
returnsc:\users\ajay\.gitconfig
.The issue I believe is that
existsSync
does not handle Window-style paths correctly (not verified). I also saw that it does not handle~
in file path.Can you please fix this so it handles these cases correctly? For now, I switched to Unix style path to be safe.
Thanks.
The text was updated successfully, but these errors were encountered: