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
This commit is contained in:
parent
6682ef42a4
commit
ff0278b32a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue