Skip to content

Commit

Permalink
Merge pull request #5436 from werf/test-fix-dev-null-error
Browse files Browse the repository at this point in the history
test: fix /dev/null error
  • Loading branch information
ilya-lesikov committed Mar 21, 2023
2 parents 20bf53a + 14353f1 commit d430d7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/werf/main_test.go
Expand Up @@ -62,10 +62,9 @@ func TestRunMain(t *testing.T) {
}

func discardStdOut() {
w, err := os.Open(os.DevNull)
devnull, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0o755)
if err != nil {
panic(err)
}

os.Stdout = w
os.Stdout = devnull
}

0 comments on commit d430d7c

Please sign in to comment.