fix(core): close turn cancellation contract gaps
This commit is contained in:
@@ -28,7 +28,7 @@ export interface RunHookOptions {
|
||||
/** Working directory for the hook (defaults to the executor's own default when omitted). */
|
||||
cwd?: string
|
||||
/** Explicit owning-operation signal; firing it cancels the hook run. */
|
||||
signal?: AbortSignal
|
||||
readonly signal: AbortSignal
|
||||
/** Whether to append a trailing newline to the stdin payload (CC yes, Codex no). */
|
||||
trailingNewline: boolean
|
||||
/**
|
||||
@@ -78,9 +78,9 @@ export async function runHook(
|
||||
command: hook.command,
|
||||
timeoutMs,
|
||||
stdin,
|
||||
signal: options.signal,
|
||||
...options.cwd !== undefined ? { workdir: options.cwd } : {},
|
||||
...options.env !== undefined ? { env: options.env } : {},
|
||||
...options.signal ? { signal: options.signal } : {},
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user