Skip to content

posh-git messes with the HOME environment variable #718

Closed
@cyanite

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions