MCPcopy Create free account
hub / github.com/anomalyco/opencode / source

Function source

packages/core/src/cross-spawn-spawner.ts:345–359  ·  view source on GitHub ↗
(handle: ChildProcessHandle, from: ChildProcess.PipeFromOption | undefined)

Source from the content-addressed store, hash-verified

343 }
344
345 const source = (handle: ChildProcessHandle, from: ChildProcess.PipeFromOption | undefined) => {
346 const opt = from ?? "stdout"
347 switch (opt) {
348 case "stdout":
349 return handle.stdout
350 case "stderr":
351 return handle.stderr
352 case "all":
353 return handle.all
354 default: {
355 const fd = ChildProcess.parseFdName(opt)
356 return Predicate.isNotUndefined(fd) ? handle.getOutputFd(fd) : handle.stdout
357 }
358 }
359 }
360
361 const spawnCommand: (
362 command: ChildProcess.Command,

Callers 2

copy.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected