MCPcopy Create free account
hub / github.com/MarsWang42/Awel / pipeChildOutput

Function pipeChildOutput

packages/cli/src/logger.ts:34–48  ·  view source on GitHub ↗
(child: ResultPromise)

Source from the content-addressed store, hash-verified

32 * each line with the magenta [next] tag.
33 */
34export function pipeChildOutput(child: ResultPromise): void {
35 if (child.stdout) {
36 const rl = createInterface({ input: child.stdout });
37 rl.on('line', (line) => {
38 process.stdout.write(`${NEXT_PREFIX} ${line}\n`);
39 });
40 }
41
42 if (child.stderr) {
43 const rl = createInterface({ input: child.stderr });
44 rl.on('line', (line) => {
45 process.stderr.write(`${NEXT_PREFIX} ${line}\n`);
46 });
47 }
48}

Callers 1

spawnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected