From 8e40cebf9363dd1438f73cc75e0813186eabc7bc Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sat, 23 Apr 2022 18:58:59 +0200 Subject: [PATCH] fix(windows): sync Home() relates to #2058 --- src/environment/windows.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/environment/windows.go b/src/environment/windows.go index 4ffa6b38..7e32297c 100644 --- a/src/environment/windows.go +++ b/src/environment/windows.go @@ -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)