author | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-04-13 13:43:51 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-04-14 11:01:01 UTC |
parent | 929a9947bfaaee25bf9a0fb42966ce5357d5ddf6 |
cmd/chasquid-util/chasquid-util.go | +4 | -1 |
diff --git a/cmd/chasquid-util/chasquid-util.go b/cmd/chasquid-util/chasquid-util.go index ab5eb7c..bc2e707 100644 --- a/cmd/chasquid-util/chasquid-util.go +++ b/cmd/chasquid-util/chasquid-util.go @@ -100,7 +100,10 @@ func userDBFromArgs(create bool) (string, string, *userdb.DB) { if err != nil { if create && os.IsNotExist(err) { fmt.Println("Creating database") - os.MkdirAll(filepath.Dir(userDBForDomain(domain)), 0755) + err = os.MkdirAll(filepath.Dir(userDBForDomain(domain)), 0755) + if err != nil { + Fatalf("Error creating database dir: %v", err) + } } else { Fatalf("Error loading database: %v", err) }