Update dependencies to include github.com/godbus/dbus
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
3a9e7036a1
commit
69ed8639cd
73 changed files with 7291 additions and 31 deletions
28
vendor/github.com/godbus/dbus/homedir.go
generated
vendored
Normal file
28
vendor/github.com/godbus/dbus/homedir.go
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
package dbus
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
homeDir string
|
||||
homeDirLock sync.Mutex
|
||||
)
|
||||
|
||||
func getHomeDir() string {
|
||||
homeDirLock.Lock()
|
||||
defer homeDirLock.Unlock()
|
||||
|
||||
if homeDir != "" {
|
||||
return homeDir
|
||||
}
|
||||
|
||||
homeDir = os.Getenv("HOME")
|
||||
if homeDir != "" {
|
||||
return homeDir
|
||||
}
|
||||
|
||||
homeDir = lookupHomeDir()
|
||||
return homeDir
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue