fix(test): use well-known SID for Windows locale compatibility

The icacls command was failing on non-English Windows because
the "Everyone" group name is localized (e.g., "Todos" in Spanish).
Using the well-known SID *S-1-1-0 works on all Windows locales.
This commit is contained in:
lluviaoscuradeldoce-design 2026-01-29 16:30:35 -05:00
parent 33863591de
commit f712388584

View File

@ -800,8 +800,9 @@ describe("security audit", () => {
await fs.writeFile(includePath, "{ logging: { redactSensitive: 'off' } }\n", "utf-8"); await fs.writeFile(includePath, "{ logging: { redactSensitive: 'off' } }\n", "utf-8");
if (isWindows) { if (isWindows) {
// Grant "Everyone" write access to trigger the perms_writable check on Windows // Grant "Everyone" write access to trigger the perms_writable check on Windows
// Use the well-known SID *S-1-1-0 for "Everyone" (works on all locales: English, Spanish, etc.)
const { execSync } = await import("node:child_process"); const { execSync } = await import("node:child_process");
execSync(`icacls "${includePath}" /grant Everyone:W`, { stdio: "ignore" }); execSync(`icacls "${includePath}" /grant *S-1-1-0:W`, { stdio: "ignore" });
} else { } else {
await fs.chmod(includePath, 0o644); await fs.chmod(includePath, 0o644);
} }