Skip to content

Commit

Permalink
internal/coordinator/remote: fix log message in legacyIncomingSSHPost…
Browse files Browse the repository at this point in the history
…Auth and IncomingSSHPostAuth

In the Plan 9 case, a log message is printed when ipErr != nil,
but the wrong variable err was displayed instead of ipErr.

Updates golang/go#53571

Change-Id: I4acab14f830b5cc0ae7a7863199c0b0f70af6524
Reviewed-on: https://go-review.googlesource.com/c/build/+/414595
Auto-Submit: Carlos Amedee <[email protected]>
Run-TryBot: David du Colombier <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Carlos Amedee <[email protected]>
  • Loading branch information
0intro authored and gopherbot committed Jun 27, 2022
1 parent d343cdf commit dc1d16a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/coordinator/remote/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (ss *SSHServer) legacyIncomingSSHPostAuth(s gssh.Session, rb *Buildlet) {
case "plan9":
fmt.Fprintf(s, "# Plan9 user/pass: glenda/glenda123\n")
if ipErr != nil {
fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", rb.Buildlet().IPPort(), err)
fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", rb.Buildlet().IPPort(), ipErr)
return
}
cmd = exec.Command("/usr/local/bin/drawterm",
Expand Down Expand Up @@ -457,7 +457,7 @@ func (ss *SSHServer) IncomingSSHPostAuth(s gssh.Session, rs *Session) {
case "plan9":
fmt.Fprintf(s, "# Plan9 user/pass: glenda/glenda123\n")
if ipErr != nil {
fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", bc.IPPort(), err)
fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", bc.IPPort(), ipErr)
return
}
cmd = exec.Command("/usr/local/bin/drawterm",
Expand Down

0 comments on commit dc1d16a

Please sign in to comment.