This commit is contained in:
lxowalle 2026-04-08 18:03:20 +08:00
parent 6ac314b15d
commit 2bd127c244
2 changed files with 6 additions and 5 deletions

View file

@ -218,13 +218,14 @@ func TestAgentLoop_MountProcessHook_IsolationSupportsRelativeDirAndCommand(t *te
t.Fatal(err)
}
if err := al.MountProcessHook(context.Background(), "ipc-relative", ProcessHookOptions{
mountErr := al.MountProcessHook(context.Background(), "ipc-relative", ProcessHookOptions{
Command: []string{"./hook-helper", "-test.run=TestProcessHook_HelperProcess", "--"},
Dir: relHookDir,
Env: processHookHelperEnv("rewrite", ""),
InterceptLLM: true,
}); err != nil {
t.Fatalf("MountProcessHook failed with relative dir/command under isolation: %v", err)
})
if mountErr != nil {
t.Fatalf("MountProcessHook failed with relative dir/command under isolation: %v", mountErr)
}
resp, err := al.runAgentLoop(context.Background(), agent, processOptions{

View file

@ -59,8 +59,8 @@ func TestResolveLinuxWorkingDir_ResolvesRelativeDir(t *testing.T) {
t.Fatalf("restore cwd: %v", chdirErr)
}
}()
if err := os.Chdir(cwd); err != nil {
t.Fatal(err)
if chdirErr := os.Chdir(cwd); chdirErr != nil {
t.Fatal(chdirErr)
}
resolvedDir, execDir, err := resolveLinuxWorkingDir("./hooks", "./hook.sh")