MCPcopy Index your code
hub / github.com/MiniMax-AI/cli / failIfMissing

Function failIfMissing

src/utils/prompt.ts:66–74  ·  view source on GitHub ↗
(flagName: string, context: string)

Source from the content-addressed store, hash-verified

64 * in non-interactive (agent / CI) mode.
65 */
66export 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
76export async function promptOrFail(opts: {
77 value: string | undefined;

Callers 4

runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
promptOrFailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected