allow SEATBELT_PROFILE=none to disable seatbelt on macos (#296)

This commit is contained in:
Olcan
2025-05-08 15:52:04 -07:00
committed by GitHub
parent b1c449d11c
commit 6b0ac084b8

View File

@@ -48,7 +48,8 @@ export function sandbox_command(sandbox?: string | boolean): string {
// if we are on macOS (Darwin) and sandbox-exec is available, use that for minimal sandboxing
if (
os.platform() === 'darwin' &&
execSync('command -v sandbox-exec || true').toString().trim()
execSync('command -v sandbox-exec || true').toString().trim() &&
process.env.SEATBELT_PROFILE !== 'none'
) {
return 'sandbox-exec';
}