(flags: ReturnType<typeof resolveCliOptions>['flags'])
| 469 | } |
| 470 | |
| 471 | function readBatchSteps(flags: ReturnType<typeof resolveCliOptions>['flags']): BatchStep[] { |
| 472 | let raw = ''; |
| 473 | if (flags.steps) { |
| 474 | raw = flags.steps; |
| 475 | } else if (flags.stepsFile) { |
| 476 | try { |
| 477 | raw = fs.readFileSync(flags.stepsFile, 'utf8'); |
| 478 | } catch (error) { |
| 479 | const message = error instanceof Error ? error.message : String(error); |
| 480 | throw new AppError( |
| 481 | 'INVALID_ARGS', |
| 482 | `Failed to read --steps-file ${flags.stepsFile}: ${message}`, |
| 483 | ); |
| 484 | } |
| 485 | } |
| 486 | return readCliBatchStepsJson(raw); |
| 487 | } |
| 488 | |
| 489 | function isDaemonStartupFailure(error: AppError): boolean { |
| 490 | if (error.code !== 'COMMAND_FAILED') return false; |
no test coverage detected
searching dependent graphs…