Skip to content

Commit

Permalink
fix: mkdir cache dir
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jul 10, 2024
1 parent ad01f38 commit e4cacf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func setupLog() (func() error, error) {
if err != nil {
return nil, err
}
if err := os.MkdirAll(filepath.Dir(logFile), 0o644); err != nil {
return nil, err
}
f, err := os.OpenFile(logFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644)
if err != nil {
return nil, err
Expand Down

0 comments on commit e4cacf7

Please sign in to comment.