mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
b86e3bee5a
Fix #29344 If HOME is not set, the gcplogs logging driver will call os/user.Current() via oauth2/google. However, in static binary, os/user.Current() leads to segfault due to a glibc issue that won't be fixed in a short term. (golang/go#13470, https://sourceware.org/bugzilla/show_bug.cgi?id=19341) So we forcibly set HOME so as to avoid call to os/user/Current(). Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
13 lines
287 B
Go
13 lines
287 B
Go
// +build !linux
|
|
|
|
package homedir
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
// GetStatic is not needed for non-linux systems.
|
|
// (Precisely, it is needed only for glibc-based linux systems.)
|
|
func GetStatic() (string, error) {
|
|
return "", errors.New("homedir.GetStatic() is not supported on this system")
|
|
}
|