-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GitLens not using Automation Shell? #2057
Comments
For me, the extension does not work at all in some cases, because the shell I'm using, is not compatible with the cmd / PowerShell format. I'm using the Nushell, and if I try to delete a branch from the graph, for example, I get the following output: "c:/Program Files/Git/cmd/git.exe" -C "PATH" -c "core.editor=code-insiders --wait --reuse-window" branch --delete BRANCH_NAME
Error: nu::parser::parse_mismatch
× Parse mismatch during operation.
╭─[entry #1:1:1]
1 │ "c:/Program Files/Git/cmd/git.exe" -C "PATH" -c "core.editor=code-insiders --wait --reuse-window" branch --delete BRANCH_NAME
· ─┬
· ╰── expected operator
╰────
GitLense shouldn't really start in this shell, since I configured cmd to be the automation shell on Windows: "terminal.integrated.automationProfile.windows": {
"path": "cmd"
}, I should have the newest version of GitLens installed |
Hello @edemaine and @Elias-Graf, looking into this issue I am unable to reproduce so it would be helpful if you can provide more context. For example, here is what I tried:
After this, I was able to work with GitLens as expected i.e. delete a branch. Is there any additional setup required to reproduce this? |
Hello @jkelroy, thanks for looking into this. I can reproduce it with the following {
"gitlens.graph.layout": "editor",
"terminal.integrated.profiles.windows": {
"nu": {
"path": "nu"
}
},
"terminal.integrated.defaultProfile.windows": "nu",
"terminal.integrated.automationProfile.windows": {
"path": "cmd"
}
} VS Code Version:
GitLense Version: This was performed on a completely fresh installation of VS Code through the Have you added the following line to your settings |
Thanks for the additional information - I was able to reproduce this issue using those settings. |
Hello, what's the ETA on this? I'm having this issue all the time, and having this fixed would be a huge time saver for me. I really enjoy the product otherwise. |
git --version
I'm in a scenario where the Git extension works fine, but GitLens does not work. See attached log.
Conjecture: GitLens uses the default terminal instead of the default automation terminal. My default terminal is a Cygwin shell (which I prefer to use in Terminal). My default automation shell is Windows Command Prompt, as needed for running Git from VSCode. My shell configuration is as follows:
It seems that GitLens uses the Git extension for some interactions with Git, but directly runs Git for other interactions. In the latter case, perhaps it's running the wrong shell?
To clarify the log,
"C:\Program Files\Git\cmd\git.exe"
runs fine in Command Prompt, but does not run in a Cygwin shell. You can also see the/cygdrive/c/...
path in the log, which is another sign that it's running in the Cygwin shell.The text was updated successfully, but these errors were encountered: