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.
19 lines
619 B
Diff
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);
|
|
|