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

Fix #718 do not create HOME env var #722

Merged
merged 3 commits into from
Dec 7, 2019

Conversation

rkeithhill
Copy link
Collaborator

@rkeithhill rkeithhill commented Nov 30, 2019

Windows does not normally define a HOME env var so we are always defining that env var. We should be using PowerShell's built-in variable $HOME instead.

Fixes #718

@rkeithhill rkeithhill requested a review from dahlbyk November 30, 2019 01:12
@rkeithhill
Copy link
Collaborator Author

@dahlbyk Ran across this which explains why we did this (and is another complaint requesting we don't do this) #153. The git.exe wrapper that comes with Git for Windows sets the HOME env var for its process. Is this sufficient? Or do other Git impls for Windows (msys, mingw, etc) require this? If so, I think we should make creation of the HOME env var conditional (or maybe we warn as you suggest in the other issue).

@cyanite
Copy link

cyanite commented Dec 5, 2019

Creating the HOME variable is problematic for entirely unrelated programs (such as Azure DevOps command line utilities), where it overrides its normal placement of config files. So enabling posh git might make things stop working. I'd prefer that posh-git never set that variable; it's not needed for git now. See also #718.

@rkeithhill
Copy link
Collaborator Author

@cyanite I lean that way myself but I also don't use any of the alternate Git impls on Windows. OTOH if those are missing $env:HOME, seems like the user could define that env var to make Git work. @dahlbyk ?

@rkeithhill
Copy link
Collaborator Author

@cyanite Going to go with not setting this env var at all. I agree that it doesn't seem like something that posh-git should be doing.

@rkeithhill rkeithhill merged commit 8115fe5 into master Dec 7, 2019
@rkeithhill rkeithhill deleted the rkeithhill/do-not-create-home-env-var branch December 7, 2019 21:05
@dahlbyk
Copy link
Owner

dahlbyk commented Mar 14, 2020

I'm good with removing this. As I noted forever ago in #153 (comment), this was in imitation of Git shims that are no longer relevant.

@dahlbyk dahlbyk added this to the v1.0 milestone Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posh-git messes with the HOME environment variable
3 participants