diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-15 12:35:43 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-15 12:38:39 +0900 |
| commit | 2e806601693e0262641386ce5430d7e8d84b2a77 (patch) | |
| tree | bf8cf3cfbe0d3e8e01524a32ef5ab96ac66de5b5 /internal/outcome/dispatcher.go | |
| parent | d0a3c6a2f3ac4da3921fa525cf1ee5ea7d68eb1c (diff) | |
internal/outcome: look up pipewire-pulse path
This is for setting up the pipewire-pulse container in shim, for #29.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/dispatcher.go')
| -rw-r--r-- | internal/outcome/dispatcher.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/outcome/dispatcher.go b/internal/outcome/dispatcher.go index 0813f819..93adfbb9 100644 --- a/internal/outcome/dispatcher.go +++ b/internal/outcome/dispatcher.go @@ -66,6 +66,8 @@ type syscallDispatcher interface { // lookupGroupId calls [user.LookupGroup] and returns the Gid field of the resulting [user.Group] struct. lookupGroupId(name string) (string, error) + // lookPath provides exec.LookPath. + lookPath(file string) (string, error) // cmdOutput provides the Output method of [exec.Cmd]. cmdOutput(cmd *exec.Cmd) ([]byte, error) @@ -140,6 +142,7 @@ func (direct) lookupGroupId(name string) (gid string, err error) { return } +func (direct) lookPath(file string) (string, error) { return exec.LookPath(file) } func (direct) cmdOutput(cmd *exec.Cmd) ([]byte, error) { return cmd.Output() } func (direct) notifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) { |
