diff --git a/flags.go b/flags.go index e5891b5ce6..514a3fd00a 100644 --- a/flags.go +++ b/flags.go @@ -8,10 +8,11 @@ import ( ) func homepath(p string) string { + home := os.Getenv("HOME") if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("USERPROFILE"), p) + home = os.Getenv("USERPROFILE") } - return filepath.Join(os.Getenv("HOME"), p) + return filepath.Join(home, p) } func getDiscovery(c *cli.Context) string {