From afc30661e4e5915ef50991764c6a2cfd1a77632f Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Mon, 9 Jan 2023 22:09:00 +0100 Subject: [PATCH] echotest: create directory when --rewrite passed Epic: none Release note: None --- pkg/testutils/echotest/echotest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/testutils/echotest/echotest.go b/pkg/testutils/echotest/echotest.go index 829929e25a32..29e31858665a 100644 --- a/pkg/testutils/echotest/echotest.go +++ b/pkg/testutils/echotest/echotest.go @@ -197,6 +197,7 @@ func (w *Walker) Check(t T) { } if len(w.missingFiles) > 0 { mk := fmt.Sprintf(`mkdir -p %[1]q && cd %[1]q && echo 'echo'`, w.dir) + _ = os.MkdirAll(w.dir, 0755) for _, f := range w.missingFiles { if w.populate { if err := os.WriteFile(filepath.Join(w.dir, f), []byte("echo\n"), 0644); err != nil {