MCPcopy Create free account
hub / github.com/apache/maka / optionValue

Function optionValue

packages/cli/src/runtime-host-cli.ts:557–560  ·  view source on GitHub ↗
(argv: string[], index: number, option: string)

Source from the content-addressed store, hash-verified

555}
556
557function 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
562function error(message: string): RuntimeHostCliError {
563 return { kind: 'error', message, exitCode: 2 };

Callers 5

parseProjectCommandFunction · 0.70
parseProfileCommandFunction · 0.70
parseServeCommandFunction · 0.70
parseAccessCommandFunction · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected