Skip to content

Commit 7ee164f

Browse files
committed
Don't panic on darwin if launchctl has no output
Fixes #31.
1 parent 83c91ae commit 7ee164f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

conn_darwin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@ func SessionBusPlatform() (*Conn, error) {
1212
return nil, err
1313
}
1414

15+
if len(b) == 0 {
16+
return nil, errors.New("dbus: couldn't determine address of session bus")
17+
}
18+
1519
return Dial("unix:path=" + string(b[:len(b)-1]))
1620
}

0 commit comments

Comments
 (0)