Skip to content

Commit

Permalink
https://github.com/udmire/observability-operator/issues/2
Browse files Browse the repository at this point in the history
  • Loading branch information
masonmei committed Sep 11, 2023
1 parent 555ad60 commit 914b303
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/templates/store/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ type LocalStore struct {
}

func New(cfg Config, logger log.Logger) *LocalStore {
err := os.MkdirAll(cfg.Directory, os.ModeDir)
if err != nil {
level.Warn(logger).Log("msg", "failed to validate the template folder", "folder", cfg.Directory, "err", err)
panic("invalid config for templates")
}

store := &LocalStore{
cfg: cfg,
lock: sync.Mutex{},
Expand Down

0 comments on commit 914b303

Please sign in to comment.