Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff0278b3 authored by Colin Cross's avatar Colin Cross
Browse files

Fix go vet error

stderr is a bytes.Buffer, but the String() method has a pointer
receiver, so stderr does not satisify the Stringer interface
and can't be used for a %s argument.  Make stderr a *bytes.Buffer
instead.

Test: go vet ./android
Change-Id: I994402cb954946279375c9d447ad3854380381cc
parent 6682ef42
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)