MCPcopy Index your code
hub / github.com/nodejs/node / execNode

Function execNode

test/sequential/test-cli-syntax-bad.js:49–56  ·  view source on GitHub ↗
(flag, path)

Source from the content-addressed store, hash-verified

47
48// Helper function to promisify exec
49function execNode(flag, path) {
50 const { promise, resolve, reject } = Promise.withResolvers();
51 exec(...common.escapePOSIXShell`"${process.execPath}" ${flag} "${path}"`, (err, stdout, stderr) => {
52 if (err) return reject({ ...err, stdout, stderr });
53 resolve({ stdout, stderr });
54 });
55 return promise;
56}

Callers 1

Calls 3

execFunction · 0.50
rejectFunction · 0.50
resolveFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…