


















@@ -1430,29 +1430,25 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {
14301430await withTempApprovalsHome({
14311431approvals: createAllowlistOnMissApprovals(),
14321432run: async () => {
1433+const tempDir = createFixtureDir("openclaw-inline-eval-bin-");
14331434for (const testCase of cases) {
1434-const tempDir = createFixtureDir("openclaw-inline-eval-bin-");
1435-try {
1436-const executablePath = createTempExecutable({
1437-dir: tempDir,
1438-name: testCase.executable,
1439-});
1440-const { runCommand, sendInvokeResult } = await runSystemInvoke({
1441-preferMacAppExecHost: false,
1442-command: [executablePath, ...testCase.args],
1443-security: "allowlist",
1444-ask: "on-miss",
1445-approvalDecision: "allow-always",
1446-approved: true,
1447-runCommand: vi.fn(async () => createLocalRunResult("inline-eval-ok")),
1448-});
1435+const executablePath = createTempExecutable({
1436+dir: tempDir,
1437+name: testCase.executable,
1438+});
1439+const { runCommand, sendInvokeResult } = await runSystemInvoke({
1440+preferMacAppExecHost: false,
1441+command: [executablePath, ...testCase.args],
1442+security: "allowlist",
1443+ask: "on-miss",
1444+approvalDecision: "allow-always",
1445+approved: true,
1446+runCommand: vi.fn(async () => createLocalRunResult("inline-eval-ok")),
1447+});
144914481450-expect(runCommand).toHaveBeenCalledTimes(1);
1451-expectInvokeOk(sendInvokeResult, { payloadContains: "inline-eval-ok" });
1452-expect(loadExecApprovals().agents?.main?.allowlist ?? []).toEqual([]);
1453-} finally {
1454-fs.rmSync(tempDir, { recursive: true, force: true });
1455-}
1449+expect(runCommand).toHaveBeenCalledTimes(1);
1450+expectInvokeOk(sendInvokeResult, { payloadContains: "inline-eval-ok" });
1451+expect(loadExecApprovals().agents?.main?.allowlist ?? []).toEqual([]);
14561452}
14571453},
14581454});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。