test(exec-approvals): gate safe-bins assertions on windows

This commit is contained in:
Peter Steinberger
2026-02-16 10:54:12 +01:00
parent 240fbf08d4
commit ec349c4d15

View File

@@ -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);
});
});