sandbox: pass cmd to cancel function
All checks were successful
Test / Create distribution (push) Successful in 25s
Test / Fortify (push) Successful in 2m35s
Test / Fpkg (push) Successful in 3m36s
Test / Data race detector (push) Successful in 4m11s
Test / Flake checks (push) Successful in 49s

This is not usually in scope otherwise.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-17 22:36:39 +09:00
parent cc89dbdf63
commit 1b9408864f
3 changed files with 12 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
"io"
"os"
"os/exec"
"slices"
"sync"
@@ -61,7 +62,7 @@ func (h *helperContainer) Start() error {
h.Env = append(h.Env, FortifyStatus+"=1")
// stat is populated on fulfill
h.Cancel = func() error { return h.stat.Close() }
h.Cancel = func(*exec.Cmd) error { return h.stat.Close() }
} else {
h.Env = append(h.Env, FortifyStatus+"=0")
}