Merge pull request #40134 from kolyshkin/homedir-osusergo
Revert "homedir: add cgo or osusergo buildtag constraints for unix"
This commit is contained in:
commit
a09e6e323e
|
@ -1,4 +1,4 @@
|
||||||
// +build !windows,cgo !windows,osusergo
|
// +build !windows
|
||||||
|
|
||||||
package homedir // import "github.com/docker/docker/pkg/homedir"
|
package homedir // import "github.com/docker/docker/pkg/homedir"
|
||||||
|
|
||||||
|
@ -16,8 +16,11 @@ func Key() string {
|
||||||
// Get returns the home directory of the current user with the help of
|
// Get returns the home directory of the current user with the help of
|
||||||
// environment variables depending on the target operating system.
|
// environment variables depending on the target operating system.
|
||||||
// Returned path should be used with "path/filepath" to form new paths.
|
// Returned path should be used with "path/filepath" to form new paths.
|
||||||
// If compiling statically, ensure the osusergo build tag is used.
|
//
|
||||||
// If needing to do nss lookups, do not compile statically.
|
// If linking statically with cgo enabled against glibc, ensure the
|
||||||
|
// osusergo build tag is used.
|
||||||
|
//
|
||||||
|
// If needing to do nss lookups, do not disable cgo or set osusergo.
|
||||||
func Get() string {
|
func Get() string {
|
||||||
home := os.Getenv(Key())
|
home := os.Getenv(Key())
|
||||||
if home == "" {
|
if home == "" {
|
||||||
|
|
Loading…
Reference in New Issue