Skip to content
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

Empty environment of the spawned git process #77

Closed
darth opened this issue Sep 19, 2021 · 1 comment
Closed

Empty environment of the spawned git process #77

darth opened this issue Sep 19, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@darth
Copy link

darth commented Sep 19, 2021

The modification of the environment of spawned process in 8377e9b actually replaces the environment that is normally inherited from the parent process with the one that contains only GIT_TERMINAL_PROMPT=0. Such a replacement can be source of different problems. For example, in my case spawned git process is not aware that it must use proxy (environment variables HTTP_PROXY/HTTPS_PROXY) to clone repos.
As far as I understand it is sort of "limitation" of underlying libuv uv_spawn function, there is no way to extend the parent process environment, only inherit or replace it.
Possible fix is to temporarily modify vim.env.GIT_TERMINAL_PROMPT before spawning a process and then to reset it back to the original value. Although it feels too much dirty for me.

@savq savq added the bug Something isn't working label Nov 12, 2021
@savq savq self-assigned this Nov 12, 2021
@savq savq closed this as completed in 9ce5c50 Dec 10, 2021
@savq
Copy link
Owner

savq commented Dec 10, 2021

@darth Paq now makes a copy of the current environment so that doesn't happen. should be ok now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants