aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-11 02:52:32 +0900
committerOphestra <cat@gensokyo.uk>2025-08-11 04:56:42 +0900
commite99d7affb0c128fa82722f9b3d79c99b5e5918cd (patch)
tree387e08d6c4363d8b9e0462f069c140fbdb15c917 /helper
parent41ac2be9658b49c68cb793f3a6f0c5932d82e1c2 (diff)
container: use absolute for pathname
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper')
-rw-r--r--helper/container.go2
-rw-r--r--helper/container_test.go5
2 files changed, 5 insertions, 2 deletions
diff --git a/helper/container.go b/helper/container.go
index 7501b28a..a3b22575 100644
--- a/helper/container.go
+++ b/helper/container.go
@@ -26,7 +26,7 @@ func New(
var args []string
h := new(helperContainer)
h.helperFiles, args = newHelperFiles(ctx, wt, stat, argF, extraFiles)
- h.Container = container.NewCommand(ctx, pathname.String(), name, args...)
+ h.Container = container.NewCommand(ctx, pathname, name, args...)
h.WaitDelay = WaitDelay
if cmdF != nil {
cmdF(h.Container)
diff --git a/helper/container_test.go b/helper/container_test.go
index 56adb8c5..2d1c256c 100644
--- a/helper/container_test.go
+++ b/helper/container_test.go
@@ -33,7 +33,10 @@ func TestContainer(t *testing.T) {
testHelper(t, func(ctx context.Context, setOutput func(stdoutP, stderrP *io.Writer), stat bool) helper.Helper {
return helper.New(ctx, container.MustAbs(os.Args[0]), "helper", argsWt, stat, argF, func(z *container.Container) {
setOutput(&z.Stdout, &z.Stderr)
- z.Bind("/", "/", 0).Proc("/proc").Dev("/dev", true)
+ z.
+ Bind(container.AbsFHSRoot, container.AbsFHSRoot, 0).
+ Proc(container.AbsFHSProc).
+ Dev(container.AbsFHSDev, true)
}, nil)
})
})