(stdout)
| 30 | } |
| 31 | |
| 32 | function parseJson(stdout) { |
| 33 | const text = String(stdout || '').trim(); |
| 34 | if (!text.startsWith('{') && !text.startsWith('[')) return null; |
| 35 | try { |
| 36 | return JSON.parse(text); |
| 37 | } catch { |
| 38 | return null; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | function runStep({ name, command, args, cwd, dryRun, timeout = 60000, required = true }) { |
| 43 | const rendered = display(command, args); |