Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GIT_EDITOR set to .sh script on windows #153246

Closed
wookie184 opened this issue Jun 26, 2022 · 5 comments
Closed

GIT_EDITOR set to .sh script on windows #153246

wookie184 opened this issue Jun 26, 2022 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues

Comments

@wookie184
Copy link

wookie184 commented Jun 26, 2022

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

  • VS Code Version: 1.69.0-insider (user setup)
  • OS Version: Windows 11 Pro 22000

Steps to Reproduce:

  1. Type $Env:GIT_EDITOR in vscode powershell terminal.
  2. Notice that result is something like "c:\Users\wookie184\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\git\dist\git-editor.sh". AFAICT .sh files are not valid executables on windows so this doesn't make much sense.

This causes issues when running external tools (e.g. https://pypi.org/project/blurb/) which try and use GIT_EDITOR themselves. This can be avoided by disabling VSCode as your git editor ("git.useEditorAsCommitInput": false) but it would be nice to not have to do this.

I'll create an issue in blurb as well but I think it would be much better if it could be fixed here if possible as I'd guess there are many other tools that use GIT_EDITOR. (I don't think blurb could do much more than using a fallback if the env variable fails).

Thanks!

@lszomoru
Copy link
Member

@wookie184, apologies for not gettig back to you on this. In the latest Stable and Insiders versions, the GIT_EDITOR environment variable should not be set by default in the integrated terminal. Could you please try the latest versions and see if you are still able to reproduce the problem by running $Env:GIT_EDITOR in the integrated terminal? This environment variable is only set if the git.terminalGitEditor is enabled.

@wookie184
Copy link
Author

@wookie184, apologies for not gettig back to you on this. In the latest Stable and Insiders versions, the GIT_EDITOR environment variable should not be set by default in the integrated terminal. Could you please try the latest versions and see if you are still able to reproduce the problem by running $Env:GIT_EDITOR in the integrated terminal? This environment variable is only set if the git.terminalGitEditor is enabled.

Thanks for the reply.

That does prevent the issue, although my use case is more that I want to use VSCode as my git editor, but for the GIT_EDITOR env variable to also be usable by other applications to use VSCode as an editor in a similar way, if that's possible. In that sense it's more of a feature request than a bug.

@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@wookie184 wookie184 changed the title GIT_EDITOR set when to .sh script on windows GIT_EDITOR set to .sh script on windows Aug 25, 2022
@vscodenpa
Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
feature-request Request for new features or functionality git GIT issues
Projects
None yet
Development

No branches or pull requests

3 participants