* Resolves the cached CLI invocation or throws with resolution diagnostics.
( cwd: string, pathValue: string )
| 103 | * Resolves the cached CLI invocation or throws with resolution diagnostics. |
| 104 | */ |
| 105 | async 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. |
no test coverage detected