mirror of https://github.com/perkeep/perkeep.git
Work around lack of cgo when cross-compiling to arm.
Change-Id: Ic230362b9f19af0c99f296f14330c970bf5d010b
This commit is contained in:
parent
272db6545a
commit
5ce4fab0f9
|
@ -20,11 +20,16 @@ package server
|
|||
|
||||
import (
|
||||
"os/user"
|
||||
|
||||
"camlistore.org/pkg/osutil"
|
||||
)
|
||||
|
||||
func getUserName() (string, error) {
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
if v := osutil.Username(); v != "" {
|
||||
return v, nil
|
||||
}
|
||||
return "", err
|
||||
}
|
||||
return u.Name, nil
|
||||
|
|
Loading…
Reference in New Issue