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

Function findVercelCli

packages/cli-exec/src/lookup.ts:108–116  ·  view source on GitHub ↗
(
  options: FindVercelCliOptions = {}
)

Source from the content-addressed store, hash-verified

106 * Returns `null` when no usable CLI executable can be found.
107 */
108export async function findVercelCli(
109 options: FindVercelCliOptions = {}
110): Promise<VercelCliInvocation | null> {
111 const cwd = path.resolve(options.cwd ?? process.cwd());
112 const pathValue = options.path ?? getEnvPath(process.env);
113 const resolution = await resolveCachedCliInvocation(cwd, pathValue);
114
115 return resolution.found ? toVercelCliInvocation(resolution) : null;
116}
117
118/**
119 * Resolves and caches the full CLI resolution, including miss diagnostics.

Callers 1

index.test.tsFile · 0.85

Calls 5

getEnvPathFunction · 0.90
toVercelCliInvocationFunction · 0.85
cwdMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected