Skip to content

Commit c247859

Browse files
fix deploy command not taking into account environment variables
1 parent c46eeee commit c247859

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/legal-bags-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix `deploy` command not taking into account environment variables

packages/cloudflare/src/cli/commands/deploy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ export async function deployCommand(args: WithWranglerArgs<{ cacheChunkSize: num
2727

2828
const wranglerConfig = readWranglerConfig(args);
2929

30-
const envVars = await getEnvFromPlatformProxy({
30+
const platformProxyEnvVars = await getEnvFromPlatformProxy({
3131
configPath: args.configPath,
3232
environment: args.env,
3333
});
3434

35+
const envVars = { ...platformProxyEnvVars, ...process.env };
36+
3537
const deploymentMapping = await getDeploymentMapping(options, config, envVars);
3638

3739
await populateCache(options, config, wranglerConfig, {

0 commit comments

Comments
 (0)