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

Function getOutput

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

* Executes the provided command, returning the process object. * @param {string} cmd * @param {?Object=} options * @return {!Object}

(cmd, options = {})

Source from the content-addressed store, hash-verified

30 * @return {!Object}
31 */
32function getOutput(cmd, options = {}) {
33 const p = spawnProcess(cmd, {
34 'cwd': options.cwd || process.cwd(),
35 'env': options.env || process.env,
36 'stdio': options.stdio || 'pipe',
37 'encoding': options.encoding || 'utf-8',
38 });
39 return p;
40}
41
42/**
43 * Executes the provided command, returning its stdout.

Callers 3

updateSubpackagesFunction · 0.70
getStdoutFunction · 0.70
getStderrFunction · 0.70

Calls 1

spawnProcessFunction · 0.85

Tested by

no test coverage detected