File: napi_child.js

package info (click to toggle)
node-addon-api 8.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,248 kB
  • sloc: cpp: 15,431; javascript: 5,631; ansic: 157; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Makes sure that child processes are spawned appropriately.
exports.spawnSync = function (command, args, options) {
  if (require('../index').needsFlag) {
    args.splice(0, 0, '--napi-modules');
  }
  return require('child_process').spawnSync(command, args, options);
};

exports.spawn = function (command, args, options) {
  if (require('../index').needsFlag) {
    args.splice(0, 0, '--napi-modules');
  }
  return require('child_process').spawn(command, args, options);
};