Преглед изворни кода

go.crypto/ssh/test: improve diagnostics for test failing to get username.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/8817043
David Symonds пре 12 година
родитељ
комит
c7af4ef7d9
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      ssh/test/test_unix_test.go

+ 2 - 0
ssh/test/test_unix_test.go

@@ -18,6 +18,7 @@ import (
 	"errors"
 	"io"
 	"io/ioutil"
+	"log"
 	"net"
 	"os"
 	"os/exec"
@@ -79,6 +80,7 @@ func username() string {
 	} else {
 		// user.Current() currently requires cgo. If an error is
 		// returned attempt to get the username from the environment.
+		log.Printf("user.Current: %v; falling back on $USER", err)
 		username = os.Getenv("USER")
 	}
 	if username == "" {