feat: update glamour (#634)

* feat: updating glamour

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: trim space

* chore: bump

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore(deps): bump

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: perms

* fix: improve logs

* feat: update glamour

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-08-21 14:43:05 -03:00 committed by GitHub
commit c89c8bd6e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 31 additions and 25 deletions

4
log.go
View file

@ -1,6 +1,7 @@
package main
import (
"io"
"os"
"path/filepath"
@ -17,12 +18,13 @@ func getLogFilePath() (string, error) {
}
func setupLog() (func() error, error) {
log.SetOutput(io.Discard)
// Log to file, if set
logFile, err := getLogFilePath()
if err != nil {
return nil, err
}
if err := os.MkdirAll(filepath.Dir(logFile), 0o644); err != nil {
if err := os.MkdirAll(filepath.Dir(logFile), 0o755); err != nil {
// log disabled
return func() error { return nil }, nil
}