-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Git for Windows set VS Code as editor wrongly using exe instead of cmd #3452
Comments
Strongly related to #2616. We should probably also call the batch wrapper for VSCodium and VS Code Insiders. |
I am worried about the implications, such as quoting paths containing spaces. The current contents of @echo off
setlocal
set VSCODE_DEV=
set ELECTRON_RUN_AS_NODE=1
"%~dp0..\Code.exe" "%~dp0..\resources\app\out\cli.js" %*
endlocal The "run Electron as node" setting is probably the thing that upsets your VS Code.
That only works if the user chose to add it to the |
Passing paths with spaces works correctly for me, so I assume
The CLI entry point for VS Code is different from the GUI executable default entry point, launching the GUI executable directly will not give you the CLI.
Yep. And although VS Code does add itself to |
Please be more precise: are you talking about manually launching the |
Tested this as well just now by creating a repo with spaces in the path and trying to commit. VS Code opened correctly. |
@segevfiner next step: find out how to change https://github.com/git-for-windows/build-extra/blob/4676f286a1ec830a5038b32400808a353dc6c48d/installer/install.iss#L1812 to pick up the |
|
Is this robust, though? Have you found any official Visual Studio Code resources that talk about figuring out the path? |
Not really. I do remember that this is the path to this since evey version of VS Code that I used, but to be sure we might want to rope in someone from the VS Code team, though I'm not sure what the appropriate channel to contact them is. |
It appears VS Code actually does the same thing: https://github.com/microsoft/vscode/blob/ee1655a82ebdfd38bf8792088a6602c69f7bbd94/src/vs/platform/native/electron-main/nativeHostMainService.ts#L361 Whether they will ever change it or not, who knows... |
So for the moment, we can do the same. Up until it breaks, that is (iff it ever breaks). Care to implement it and open a PR in |
When VS Code is configured as editor, [it no longer needs the window to be closed, just the tab](git-for-windows/git#3452). Signed-off-by: Johannes Schindelin <[email protected]>
Setup
defaults?
to the issue you're seeing?
Pretty much a new computer and a clean install.
Details
PowerShell 7.1.4
Minimal, Complete, and Verifiable example
this will help us understand the issue.
The VS Code editor will open with the
COMMIT_EDITMSG
file, and when the tab is closed, the commit will proceed.The commit only proceeds when the window is closed, and I get strange debug messages from VS Code in the terminal.
The VS Code
code
CLI is not theCode.exe
executable, rather it is abin\code.cmd
inside the installation folder. It is thisbin
folder that is added to thePATH
.Git for Windows' installer sets:
But it should be:
Or:
URL to that repository to help us with testing?
Any repo.
The text was updated successfully, but these errors were encountered: