(argv: string[], index: number, option: string)
| 555 | } |
| 556 | |
| 557 | function optionValue(argv: string[], index: number, option: string): string | RuntimeHostCliError { |
| 558 | const value = argv[index + 1]; |
| 559 | return !value || value.startsWith('-') ? error(`${option} requires a value`) : value; |
| 560 | } |
| 561 | |
| 562 | function error(message: string): RuntimeHostCliError { |
| 563 | return { kind: 'error', message, exitCode: 2 }; |
no test coverage detected