File: napi_child.js

package info (click to toggle)
node-addon-api 8.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,256 kB
  • sloc: cpp: 15,585; javascript: 5,664; ansic: 157; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (2)
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);
};