chore(util): log spawned processes (#42948)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
opencode-agent[bot]
2026-08-16 19:36:02 -04:00
committed by GitHub
parent 39810da936
commit 45771a7e39
+9 -1
View File
@@ -258,7 +258,7 @@ const makeCrossSpawnSpawner = Effect.gen(function* () {
return { stdout, stderr, all: Stream.merge(stdout, stderr) }
}
const spawn = (command: ChildProcess.StandardCommand, opts: NodeChildProcess.SpawnOptions) =>
const launchProcess = (command: ChildProcess.StandardCommand, opts: NodeChildProcess.SpawnOptions) =>
Effect.callback<readonly [NodeChildProcess.ChildProcess, ExitSignal], PlatformError.PlatformError>((resume) => {
const signal = Deferred.makeUnsafe<readonly [code: number | null, signal: NodeJS.Signals | null]>()
const proc = launch(command.command, command.args, opts)
@@ -283,6 +283,14 @@ const makeCrossSpawnSpawner = Effect.gen(function* () {
})
})
const spawn = Effect.fnUntraced(function* (
command: ChildProcess.StandardCommand,
opts: NodeChildProcess.SpawnOptions,
) {
yield* Effect.logInfo("spawning process", { command: command.command, args: command.args, cwd: opts.cwd })
return yield* launchProcess(command, opts)
})
const killGroup = (
command: ChildProcess.StandardCommand,
proc: NodeChildProcess.ChildProcess,