MCPcopy Create free account
hub / github.com/nodejs/node / run

Function run

test/fixtures/eval/stdin_messages.js:28–37  ·  view source on GitHub ↗
(cmd, strict, cb)

Source from the content-addressed store, hash-verified

26const spawn = require('child_process').spawn;
27
28function run(cmd, strict, cb) {
29 const args = [];
30 if (strict) args.push('--use_strict');
31 args.push('-p');
32 const child = spawn(process.execPath, args);
33 child.stdout.pipe(process.stdout);
34 child.stderr.pipe(process.stdout);
35 child.stdin.end(cmd);
36 child.on('close', cb);
37}
38
39const queue =
40 [ 'with(this){__filename}',

Callers 1

goFunction · 0.70

Calls 4

spawnFunction · 0.50
pushMethod · 0.45
endMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected