launch middle man process on macOS to workaround SIP limit (#416)

This commit is contained in:
Tingluo Huang
2020-04-09 16:13:06 -04:00
committed by GitHub
parent baa6ded3bc
commit 2bd0b1af0e
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
const { spawn } = require('child_process');
// argv[0] = node
// argv[1] = macos-run-invoker.js
var shell = process.argv[2];
var args = process.argv.slice(3);
console.log(`::debug::macos-run-invoker: ${shell}`);
console.log(`::debug::macos-run-invoker: ${JSON.stringify(args)}`);
var launch = spawn(shell, args, { stdio: 'inherit' });
launch.on('exit', function (code) {
if (code !== 0) {
process.exit(code);
}
});