mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
test(exec-approvals): gate safe-bins assertions on windows
This commit is contained in:
@@ -459,6 +459,11 @@ describe("exec approvals allowlist evaluation", () => {
|
||||
safeBins: normalizeSafeBins(["jq"]),
|
||||
cwd: "/tmp",
|
||||
});
|
||||
// Safe bins are disabled on Windows (PowerShell parsing/expansion differences).
|
||||
if (process.platform === "win32") {
|
||||
expect(result.allowlistSatisfied).toBe(false);
|
||||
return;
|
||||
}
|
||||
expect(result.allowlistSatisfied).toBe(true);
|
||||
expect(result.allowlistMatches).toEqual([]);
|
||||
});
|
||||
@@ -651,6 +656,11 @@ describe("exec approvals node host allowlist check", () => {
|
||||
safeBins: normalizeSafeBins(["jq"]),
|
||||
cwd: "/tmp",
|
||||
});
|
||||
// Safe bins are disabled on Windows (PowerShell parsing/expansion differences).
|
||||
if (process.platform === "win32") {
|
||||
expect(safe).toBe(false);
|
||||
return;
|
||||
}
|
||||
expect(safe).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user