Skip to content

Commit 0a388ce

Browse files
VercelEnvironment fix
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 5571b06 commit 0a388ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/build/src/extensions/vercelSyncEnvVars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export function syncVercelEnvVars(
3232
const vercelEnvironment =
3333
environmentMap[ctx.environment as keyof typeof environmentMap];
3434

35+
if (!vercelEnvironment) {
36+
throw new Error(
37+
`Invalid environment '${ctx.environment}'. Expected 'prod', 'staging', or 'dev'.`
38+
);
39+
}
3540
const vercelApiUrl =
3641
`https://api.vercel.com/v8/projects/${projectId}/env?decrypt=true`;
3742

0 commit comments

Comments
 (0)