mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
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:
parent
4578bc149a
commit
c89c8bd6e7
6 changed files with 31 additions and 25 deletions
4
log.go
4
log.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue