Skip to content

Commit

Permalink
echotest: create directory when --rewrite passed
Browse files Browse the repository at this point in the history
Epic: none
Release note: None
  • Loading branch information
tbg committed Jan 16, 2023
1 parent 761cf72 commit afc3066
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/testutils/echotest/echotest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit afc3066

Please sign in to comment.