dbus: fail on LookPath error
Some checks failed
Tests / Go tests (push) Failing after 29s
Nix / NixOS tests (push) Failing after 2m2s

An absolute path to xdg-dbus-proxy is required.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2024-12-26 15:29:26 +09:00
parent 831dc6a181
commit f8cabe3ab2
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -46,7 +46,9 @@ func (p *Proxy) Start(ready chan error, output io.Writer, sandbox bool) error {
// look up absolute path if name is just a file name
toolPath := p.name
if filepath.Base(p.name) == p.name {
if s, err := exec.LookPath(p.name); err == nil {
if s, err := exec.LookPath(p.name); err != nil {
return err
} else {
toolPath = s
}
}