diff --git a/src/environment_windows.go b/src/environment_windows.go index 12a53975..66c293d1 100644 --- a/src/environment_windows.go +++ b/src/environment_windows.go @@ -44,6 +44,10 @@ func (env *environment) isRunningAsRoot() bool { } func (env *environment) homeDir() string { + // return the right HOME reference when using MSYS2 + if env.getShellName() == bash { + return os.Getenv("HOME") + } home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") if home == "" { home = os.Getenv("USERPROFILE")