Skip to content

Commit

Permalink
fix(config): User config should be looked for when the user exists
Browse files Browse the repository at this point in the history
  • Loading branch information
15cm authored and jmattheis committed Apr 23, 2019
1 parent 170fbab commit 61a3e6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/locations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}

Expand Down

0 comments on commit 61a3e6c

Please sign in to comment.