Skip to content

Commit

Permalink
Fix broken first startup
Browse files Browse the repository at this point in the history
  • Loading branch information
anfragment committed Apr 1, 2024
1 parent cb46c85 commit 3702196
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ func init() {
if err := os.MkdirAll(ConfigDir, 0755); err != nil {
log.Fatalf("failed to create config dir: %v", err)
}
stat, err = os.Stat(ConfigDir)

Check failure on line 63 in cfg/config.go

View workflow job for this annotation

GitHub Actions / Lint Go (windows-latest)

ineffectual assignment to err (ineffassign)
} else {
log.Fatalf("failed to stat config dir: %v", err)
}
}
if !stat.IsDir() {
log.Fatalf("config dir is not a directory")
log.Fatalf("config dir is not a directory: %s", ConfigDir)
}

DataDir, err = getDataDir()
Expand All @@ -78,12 +79,13 @@ func init() {
if err := os.MkdirAll(DataDir, 0755); err != nil {
log.Fatalf("failed to create data dir: %v", err)
}
stat, err = os.Stat(DataDir)

Check failure on line 82 in cfg/config.go

View workflow job for this annotation

GitHub Actions / Lint Go (windows-latest)

ineffectual assignment to err (ineffassign)
} else {
log.Fatalf("failed to stat data dir: %v", err)
}
}
if !stat.IsDir() {
log.Fatalf("data dir is not a directory")
log.Fatalf("data dir is not a directory: %s", DataDir)
}
}

Expand Down

0 comments on commit 3702196

Please sign in to comment.