(flagName: string, context: string)
| 64 | * in non-interactive (agent / CI) mode. |
| 65 | */ |
| 66 | export function failIfMissing(flagName: string, context: string): never { |
| 67 | throw new CLIError( |
| 68 | `Missing required argument: --${flagName}\n` + |
| 69 | `Hint: In non-interactive (CI / agent) environments all required flags must be provided.\n` + |
| 70 | ` In an interactive terminal, run without --${flagName} and the CLI will prompt for it.`, |
| 71 | ExitCode.USAGE, |
| 72 | context, |
| 73 | ); |
| 74 | } |
| 75 | |
| 76 | export async function promptOrFail(opts: { |
| 77 | value: string | undefined; |
no outgoing calls
no test coverage detected