Skip to content

Commit

Permalink
go/tools/builders: don't format subcommand output as []byte (#2766)
Browse files Browse the repository at this point in the history
Use os.Stderr.Write instead of fmt.Fprint. The latter formats the
value as a []byte, not a string.

(This was due to my own bad review comment on #2736. Sorry.)
  • Loading branch information
Jay Conrod committed Dec 23, 2020
1 parent 896ea51 commit 634b0f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/tools/builders/env.go
Expand Up @@ -137,7 +137,7 @@ func (e *env) runCommand(args []string) error {
cmd.Stdout = buf
cmd.Stderr = buf
err := runAndLogCommand(cmd, e.verbose)
fmt.Fprint(os.Stderr, relativizePaths(buf.Bytes()))
os.Stderr.Write(relativizePaths(buf.Bytes()))
return err
}

Expand Down

0 comments on commit 634b0f7

Please sign in to comment.