MCPcopy Create free account
hub / github.com/vercel/vercel / buildCommandWithYes

Function buildCommandWithYes

packages/cli/src/util/agent-output.ts:103–111  ·  view source on GitHub ↗
(
  argv: string[],
  pkgName: string = packageName
)

Source from the content-addressed store, hash-verified

101 * Used for non-interactive "confirmation required" payloads.
102 */
103export function buildCommandWithYes(
104 argv: string[],
105 pkgName: string = packageName
106): string {
107 const args = stripSensitiveAuthArgs(argv.slice(2));
108 const hasYes = args.some(a => a === '--yes' || a === '-y');
109 const out = hasYes ? args : [...args, '--yes'];
110 return `${pkgName} ${out.join(' ')}`.trim();
111}
112
113/** Global flags that should be preserved in suggested "next" commands (e.g. --cwd, --non-interactive). */
114const GLOBAL_FLAG_NAMES = new Set([

Callers 15

removeCmdFunction · 0.90
tokensCmdFunction · 0.90
backupsCmdFunction · 0.90
rmFunction · 0.90
addStoreFunction · 0.90
emptyStoreFunction · 0.90
removeStoreFunction · 0.90
removeFromGroupFunction · 0.90
deleteGroupFunction · 0.90
rmFunction · 0.90
confirmActionFunction · 0.90

Calls 2

stripSensitiveAuthArgsFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected