@param {{exitCode: number, output: string, hasOutput: boolean, durationMs: number}} result
(result)
| 74 | let settled = false; |
| 75 | /** @param {{exitCode: number, output: string, hasOutput: boolean, durationMs: number}} result */ |
| 76 | function settle(result) { |
| 77 | if (settled) return; |
| 78 | settled = true; |
| 79 | resolve(result); |
| 80 | } |
| 81 | |
| 82 | const argsForLog = logArgs ?? args; |
| 83 | log(`attempt ${attempt + 1}: spawning: ${command} ${argsForLog.join(" ").substring(0, 200)}`); |