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

posh-git messes with the HOME environment variable #718

Closed
cyanite opened this issue Nov 25, 2019 · 0 comments · Fixed by #722
Closed

posh-git messes with the HOME environment variable #718

cyanite opened this issue Nov 25, 2019 · 0 comments · Fixed by #722

Comments

@cyanite
Copy link

cyanite commented Nov 25, 2019

This happens with posh-git 1.0.0 beta, and possibly earlier. We have the following lines in the psm1:

if (!$Env:HOME) { $Env:HOME = "$Env:HOMEDRIVE$Env:HOMEPATH" }
if (!$Env:HOME) { $Env:HOME = "$Env:USERPROFILE" }

This is a problem if the HOME variable wasn't previously set, as it may affect various unrelated programs.

In our particular case we have USERPROFILE pointing to the local C:\Users\name as usual, and HOMEDRIVE set to a mapped network drive. Some programs might default to HOME, then USERPROFILE then HOMEDRIVE, which is now reversed after posh-git has been imported.

posh-git shouldn't mess with important environment variables that affect other things than Git.

rkeithhill added a commit that referenced this issue Nov 30, 2019
rkeithhill added a commit that referenced this issue Dec 7, 2019
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 a pull request may close this issue.

1 participant