diff --git a/android/bazel_handler.go b/android/bazel_handler.go index d4f6e4c9e..b7cea4be7 100644 --- a/android/bazel_handler.go +++ b/android/bazel_handler.go @@ -188,8 +188,8 @@ func (context *bazelContext) issueBazelCommand(command string, labels []string, bazelCmd.Dir = context.workspaceDir bazelCmd.Env = append(os.Environ(), "HOME="+context.homeDir, pwdPrefix()) - var stderr bytes.Buffer - bazelCmd.Stderr = &stderr + stderr := &bytes.Buffer{} + bazelCmd.Stderr = stderr if output, err := bazelCmd.Output(); err != nil { return "", fmt.Errorf("bazel command failed. command: [%s], error [%s]", bazelCmd, stderr) diff --git a/android/paths_test.go b/android/paths_test.go index d099f6502..108bd6c0d 100644 --- a/android/paths_test.go +++ b/android/paths_test.go @@ -1260,7 +1260,7 @@ func ExampleOutputPath_ReplaceExtension() { // boot.art boot.oat } -func ExampleOutputPath_FileInSameDir() { +func ExampleOutputPath_InSameDir() { ctx := &configErrorWrapper{ config: TestConfig("out", nil, "", nil), }