MCPcopy Index your code
hub / github.com/ampproject/amphtml / spawnProcess

Function spawnProcess

build-system/common/process.js:21–24  ·  view source on GitHub ↗

* Spawns the given command in a child process with the given options. * Special-cases the AMP task runner so that it is correctly spawned on all * platforms (node shebangs do not work on Windows). * * @param {string} cmd * @param {?Object} options * @return {!Object}

(cmd, options)

Source from the content-addressed store, hash-verified

19 * @return {!Object}
20 */
21function spawnProcess(cmd, options) {
22 const cmdToSpawn = cmd.startsWith('amp ') ? `node ${cmd}` : cmd;
23 return childProcess.spawnSync(cmdToSpawn, {shell: shellCmd, ...options});
24}
25
26/**
27 * Executes the provided command, returning the process object.

Callers 2

execFunction · 0.85
getOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected