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