Skip to content

Commit 3624660

Browse files
update upload command as well
1 parent c247859 commit 3624660

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.changeset/legal-bags-agree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@opennextjs/cloudflare": patch
33
---
44

5-
fix `deploy` command not taking into account environment variables
5+
fix `deploy` and `upload` commands not taking into account environment variables

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ export async function uploadCommand(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)