fix(windows): sync Home()

relates to #2058
This commit is contained in:
Jan De Dobbeleer 2022-04-23 18:58:59 +02:00 committed by Jan De Dobbeleer
parent 0c75d2a063
commit 8e40cebf93

View file

@ -55,6 +55,10 @@ func (env *ShellEnvironment) Root() bool {
}
func (env *ShellEnvironment) Home() string {
env.lock.Lock()
defer func() {
env.lock.Unlock()
}()
home := os.Getenv("HOME")
defer func() {
env.log(Debug, "Home", home)