MCPcopy Create free account
hub / github.com/cli/cli / set

Function set

evals/src/core/calls.ts:62–67  ·  view source on GitHub ↗
(flag: string, value: string)

Source from the content-addressed store, hash-verified

60 const options = new Map<string, string>();
61 const fields: string[] = [];
62 const set = (flag: string, value: string) => {
63 flag = spec.aliases?.[flag] ?? flag;
64 const previous = options.get(flag);
65 options.set(flag, joined.has(flag) && previous !== undefined ? `${previous},${value}` : value);
66 if (fieldFlags.has(flag)) fields.push(value);
67 };
68 let help = false;
69 for (let index = 0; index < args.length; index++) {
70 const arg = args[index]!;

Callers 1

parseArgvFunction · 0.85

Calls 2

getMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected