diff --git a/pkg/cmd/run/view/view.go b/pkg/cmd/run/view/view.go index 0b311a66a..f79702181 100644 --- a/pkg/cmd/run/view/view.go +++ b/pkg/cmd/run/view/view.go @@ -46,6 +46,10 @@ func (c RunLogCache) Exists(key string) (bool, error) { } func (c RunLogCache) Create(key string, content io.Reader) error { + if err := os.MkdirAll(filepath.Dir(c.cacheDir), 0755); err != nil { + return fmt.Errorf("creating cache directory: %v", err) + } + out, err := os.Create(c.filepath(key)) if err != nil { return fmt.Errorf("creating cache entry: %v", err)