MCPcopy Create free account
hub / github.com/ampproject/amphtml / execScriptAsync

Function execScriptAsync

build-system/common/exec.js:35–38  ·  view source on GitHub ↗

* Executes the provided shell script in an asynchronous process. Special-cases * the AMP task runner so that it is correctly spawned on all platforms (node * shebangs do not work on Windows). * * @param {string} script * @param {?Object} options * @return {!childProcess.ChildProcessWithoutNull

(script, options)

Source from the content-addressed store, hash-verified

33 * @return {!childProcess.ChildProcessWithoutNullStreams}
34 */
35function execScriptAsync(script, options) {
36 const scriptToSpawn = script.startsWith('amp ') ? `node ${script}` : script;
37 return childProcess.spawn(scriptToSpawn, {shell: shellCmd, ...options});
38}
39
40/**
41 * Executes the provided command, and terminates the program in case of failure.

Callers 3

jscodeshiftAsyncFunction · 0.85
startStorybookFunction · 0.85
ctrlcHandler.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected