From c7af4ef7d9e15a6783ae5ec853ec430c9944cdcc Mon Sep 17 00:00:00 2001 From: David Symonds Date: Wed, 17 Apr 2013 16:22:42 +1000 Subject: go.crypto/ssh/test: improve diagnostics for test failing to get username. R=golang-dev, dave CC=golang-dev https://golang.org/cl/8817043 --- ssh/test/test_unix_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ssh') diff --git a/ssh/test/test_unix_test.go b/ssh/test/test_unix_test.go index 63d290f..f71beb6 100644 --- a/ssh/test/test_unix_test.go +++ b/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 == "" { -- cgit v1.3-6-g1900