Files
nixpkgs/pkgs/development/web/nodejs/use-nix-codesign.patch
Alex James 1bc6e6c095 nodejs: use sigtool's codesign in test-macos-app-sandbox
test-macos-app-sandbox uses the system-provided codesign binary
(/usr/bin/codesign) to apply entitlements to an app bundle. This fails
in the sandbox as /usr/bin/codesign is not accessible. Patch the test to
instead use the codesign binary from sigtool. The test was updated to
pass the executable path to codesign as sigtool can't handle the bundle
path.
2025-08-30 01:27:52 -05:00

19 lines
619 B
Diff

diff --git a/test/parallel/test-macos-app-sandbox.js b/test/parallel/test-macos-app-sandbox.js
index 60ad67b3db..b6ac0dcef4 100644
--- a/test/parallel/test-macos-app-sandbox.js
+++ b/test/parallel/test-macos-app-sandbox.js
@@ -45,11 +45,11 @@ fs.copyFileSync(
// Sign the app bundle with sandbox entitlements:
assert.strictEqual(
- child_process.spawnSync('/usr/bin/codesign', [
+ child_process.spawnSync('@codesign@', [
'--entitlements', fixtures.path(
'macos-app-sandbox', 'node_sandboxed.entitlements'),
'--force', '-s', '-',
- appBundlePath,
+ appExecutablePath,
]).status,
0);