mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
fix: mkdir cache dir
This commit is contained in:
parent
ad01f380bd
commit
e4cacf7319
1 changed files with 3 additions and 0 deletions
3
log.go
3
log.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue