We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b68448a commit 75f3df7Copy full SHA for 75f3df7
go/tools/bazel_testing/bazel_testing.go
@@ -206,17 +206,7 @@ func RunBazel(args ...string) error {
206
// If the command starts but exits with a non-zero status, a *StderrExitError
207
// will be returned which wraps the original *exec.ExitError.
208
func BazelOutput(args ...string) ([]byte, error) {
209
- cmd := BazelCmd(args...)
210
- stdout := &bytes.Buffer{}
211
- stderr := &bytes.Buffer{}
212
- cmd.Stdout = stdout
213
- cmd.Stderr = stderr
214
- err := cmd.Run()
215
- if eErr, ok := err.(*exec.ExitError); ok {
216
- eErr.Stderr = stderr.Bytes()
217
- err = &StderrExitError{Err: eErr}
218
- }
219
- return stdout.Bytes(), err
+ return BazelOutputWithInput(nil, args...)
220
}
221
222
// BazelOutputWithInput invokes a bazel command with a list of arguments and
0 commit comments