Update vendoring for github.com/godbus/dbus

This commit is contained in:
Ben Kochie 2016-12-16 12:55:26 +01:00
commit 84c6c66a35
16 changed files with 888 additions and 270 deletions

View file

@ -5,17 +5,17 @@ import (
"os/exec"
)
func sessionBusPlatform() (*Conn, error) {
func getSessionBusPlatformAddress() (string, error) {
cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET")
b, err := cmd.CombinedOutput()
if err != nil {
return nil, err
return "", err
}
if len(b) == 0 {
return nil, errors.New("dbus: couldn't determine address of session bus")
return "", errors.New("dbus: couldn't determine address of session bus")
}
return Dial("unix:path=" + string(b[:len(b)-1]))
return "unix:path=" + string(b[:len(b)-1]), nil
}