vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Git extension shell

Open r34son opened this issue 1 year ago • 1 comments

Does this issue occur when all extensions are disabled?: No

Version: 1.90.2 Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:54:35.075Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.3.0

Steps to Reproduce:

  1. add echo $SHELL && exit 1 in git pre-commit hook
  2. After commiting in GUI i can see in output that bash shell is used

How can I change it to zsh so that all git commands by extension will run in zsh?

r34son avatar Jun 28 '24 20:06 r34son

same question on SO https://stackoverflow.com/questions/78204185/how-to-configure-the-shell-that-vscode-extensions-use

r34son avatar Jun 28 '24 20:06 r34son

Sorry for not getting back to you on this until now. When you perform a source control operation VS Could would spawn a child process and execute git.exe. This child process "inherits" the environment variables from VS Code and in turn VS Code inherits the environment variables from where it was launched. What is the reason for using zsh for running the git commands? Is it merely the environment variables?

lszomoru avatar Jul 30 '24 15:07 lszomoru

I wanna use zsh to run scripts and get env vars from .zshrc

r34son avatar Jul 30 '24 21:07 r34son

Could you try opening a Terminal that uses zsh and launch code from there? Thanks!

lszomoru avatar Aug 02 '24 13:08 lszomoru

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!