diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-09-29 15:27:29 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-09-29 15:27:29 +0900 |
| commit | 98f9fdb7cc949469d34a1428c3dd093ebf6aa4eb (patch) | |
| tree | f856d2ef7dcacba5e9ab8b441b94a586c4a9b8e6 /dbus/run.go | |
| parent | dc59f20d7b65ab3ffd56e298a62f9b0b5b107c6e (diff) | |
dbus: configurable xdg-dbus-proxy output
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus/run.go')
| -rw-r--r-- | dbus/run.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dbus/run.go b/dbus/run.go index eef0d145..0b8267f8 100644 --- a/dbus/run.go +++ b/dbus/run.go @@ -2,14 +2,14 @@ package dbus import ( "errors" - "os" + "io" "git.ophivana.moe/cat/fortify/helper" ) // Start launches the D-Bus proxy and sets up the Wait method. // ready should be buffered and should only be received from once. -func (p *Proxy) Start(ready chan error, output bool) error { +func (p *Proxy) Start(ready chan error, output io.Writer) error { p.lock.Lock() defer p.lock.Unlock() @@ -25,9 +25,9 @@ func (p *Proxy) Start(ready chan error, output bool) error { // xdg-dbus-proxy does not need to inherit the environment h.Env = []string{} - if output { - h.Stdout = os.Stdout - h.Stderr = os.Stderr + if output != nil { + h.Stdout = output + h.Stderr = output } if err := h.StartNotify(ready); err != nil { return err |
