Skip to content

Commit 706023d

Browse files
committed
Fix runner errors redirection
1 parent eb3f15a commit 706023d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/flakeguard/runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ type exitCoder interface {
5555
// runTests runs the tests for a given package and returns the path to the output file.
5656
func (r *Runner) runTests(packageName string) (string, bool, error) {
5757
args := []string{"test", packageName, "-json", "-count=1"} // Enable JSON output
58-
args = append(args, "2>/dev/null") // Redirect stderr to null
5958
if r.UseRace {
6059
args = append(args, "-race")
6160
}
6261
if len(r.SkipTests) > 0 {
6362
skipPattern := strings.Join(r.SkipTests, "|")
6463
args = append(args, fmt.Sprintf("-skip=%s", skipPattern))
6564
}
65+
// The last arg redirects stderr to null
66+
args = append(args, "2>/dev/null")
6667

6768
if r.Verbose {
6869
log.Printf("Running command: go %s\n", strings.Join(args, " "))

0 commit comments

Comments
 (0)