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

Function resolveInvocationOrThrow

packages/cli-exec/src/exec.ts:105–119  ·  view source on GitHub ↗

* Resolves the cached CLI invocation or throws with resolution diagnostics.

(
  cwd: string,
  pathValue: string
)

Source from the content-addressed store, hash-verified

103 * Resolves the cached CLI invocation or throws with resolution diagnostics.
104 */
105async function resolveInvocationOrThrow(
106 cwd: string,
107 pathValue: string
108): Promise<VercelCliInvocation> {
109 const resolution = await resolveCachedCliInvocation(cwd, pathValue);
110
111 if (!resolution.found) {
112 throw new VercelCliError({
113 code: 'VERCEL_CLI_NOT_FOUND',
114 message: getCliNotFoundMessage(resolution.diagnostics),
115 });
116 }
117
118 return toVercelCliInvocation(resolution);
119}
120
121/**
122 * Merges a caller-provided environment over the current process environment.

Callers 1

execResolvedVercelCliFunction · 0.85

Calls 3

getCliNotFoundMessageFunction · 0.90
toVercelCliInvocationFunction · 0.90

Tested by

no test coverage detected