From 61a3e6c290f6145b12a6eda94db6063822232ea3 Mon Sep 17 00:00:00 2001 From: Sinkerine Date: Tue, 23 Apr 2019 12:07:15 -0400 Subject: [PATCH] fix(config): User config should be looked for when the user exists --- config/locations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locations.go b/config/locations.go index 5f30ee9..e2a723f 100644 --- a/config/locations.go +++ b/config/locations.go @@ -9,7 +9,7 @@ import ( func GetLocations() (res []string) { res = append(res, "./cli.json") - if usr, err := user.Current(); err != nil { + if usr, err := user.Current(); err == nil { res = append(res, filepath.Join(usr.HomeDir, ".gotify", "cli.json")) }