MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / notifyJob

Function notifyJob

src/index.js:577–581  ·  view source on GitHub ↗
(directory, job, reason)

Source from the content-addressed store, hash-verified

575}
576
577async function runShellCommand(command, cwd, timeoutMs = 120_000) {
578 return await new Promise((resolve) => {
579 const child = spawn(command, [], { cwd, shell: true, windowsHide: true })
580 const stdout = []
581 const stderr = []
582 const timer = setTimeout(() => { try { child.kill("SIGTERM") } catch {} }, timeoutMs)
583 child.stdout?.on("data", (data) => stdout.push(Buffer.from(data)))
584 child.stderr?.on("data", (data) => stderr.push(Buffer.from(data)))

Callers 2

finalizeActiveRunFunction · 0.85
maybeRunDueJobsFunction · 0.85

Calls 1

runShellCommandFunction · 0.85

Tested by

no test coverage detected