MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / readArgValue

Function readArgValue

scripts/feishu/smoke.ts:2545–2556  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

2543}
2544
2545function readArgValue(name: string): string | undefined {
2546 const argv = process.argv.slice(2);
2547 const index = argv.indexOf(name);
2548 if (index === -1) {
2549 return undefined;
2550 }
2551 const value = argv[index + 1]?.trim();
2552 if (!value || value.startsWith("--")) {
2553 throw new Error(`${name} requires a path.`);
2554 }
2555 return value;
2556}
2557
2558main().catch((error) => {
2559 const output = buildSmokeCliErrorOutput(error);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected