From c4c497b88e770c4af9e3c0bb79602bc3b2f8fcac Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 9 Jan 2023 17:57:57 -0500 Subject: [PATCH] mkdirall --- zrokdir/version.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zrokdir/version.go b/zrokdir/version.go index 792a55a1..b7f3c5b5 100644 --- a/zrokdir/version.go +++ b/zrokdir/version.go @@ -5,6 +5,7 @@ import ( "github.com/openziti-test-kitchen/zrok/tui" "github.com/pkg/errors" "os" + "path/filepath" ) const V = "v0.3" @@ -42,6 +43,9 @@ func writeMetadata() error { if err != nil { return err } + if err := os.MkdirAll(filepath.Dir(mf), os.FileMode(0700)); err != nil { + return err + } if err := os.WriteFile(mf, data, os.FileMode(0400)); err != nil { return err }