diff options
Diffstat (limited to 'vendor/github.com/godbus/dbus/homedir_dynamic.go')
-rw-r--r-- | vendor/github.com/godbus/dbus/homedir_dynamic.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/godbus/dbus/homedir_dynamic.go b/vendor/github.com/godbus/dbus/homedir_dynamic.go new file mode 100644 index 000000000..2732081e7 --- /dev/null +++ b/vendor/github.com/godbus/dbus/homedir_dynamic.go @@ -0,0 +1,15 @@ +// +build !static_build + +package dbus + +import ( + "os/user" +) + +func lookupHomeDir() string { + u, err := user.Current() + if err != nil { + return "/" + } + return u.HomeDir +} |