* True when a child-process error indicates the process was killed (e.g. by the * `timeout` option → SIGTERM), whose stdout is only a partial capture.
(err: unknown)
| 231 | * `timeout` option → SIGTERM), whose stdout is only a partial capture. |
| 232 | */ |
| 233 | function isKilledExecError(err: unknown): boolean { |
| 234 | if (typeof err !== "object" || err === null) return false; |
| 235 | const e = err as NodeJS.ErrnoException & { killed?: boolean; signal?: string | null }; |
| 236 | return e.killed === true || e.signal != null; |
| 237 | } |
| 238 | |
| 239 | /** Extract captured stdout from a child-process error, if present, as a string. */ |
| 240 | function execErrorStdout(err: unknown): string | undefined { |
no outgoing calls
no test coverage detected