Skip to content

Commit 2f460ed

Browse files
add deploy field to WranglerOptions
1 parent ec32b68 commit 2f460ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export async function deployCommand(args: WithWranglerArgs<{ cacheChunkSize?: nu
5656
],
5757
{
5858
logging: "all",
59+
deploy: true,
5960
}
6061
);
6162
}

packages/cloudflare/src/cli/utils/run-wrangler.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type WranglerOptions = {
1313
environment?: string;
1414
configPath?: string;
1515
logging?: "all" | "error";
16+
deploy?: boolean;
1617
};
1718

1819
/**
@@ -58,8 +59,6 @@ function injectPassthroughFlagForArgs(options: BuildOptions, args: string[]) {
5859
export function runWrangler(options: BuildOptions, args: string[], wranglerOpts: WranglerOptions = {}) {
5960
const shouldPipeLogs = wranglerOpts.logging === "error";
6061

61-
const isDeployCommand = args[0] === "deploy";
62-
6362
const result = spawnSync(
6463
options.packager,
6564
[
@@ -89,7 +88,7 @@ export function runWrangler(options: BuildOptions, args: string[], wranglerOpts:
8988
// to let `wrangler deploy` know that it is being run from open-next. We do this because
9089
// otherwise `wrangler deploy` run in an open-next project would call
9190
// `opennextjs-cloudflare deploy` (thus causing an unwanted recursion).
92-
...(isDeployCommand ? { OPEN_NEXT_DEPLOY: "true" } : {}),
91+
...(wranglerOpts.deploy ? { OPEN_NEXT_DEPLOY: "true" } : {}),
9392
},
9493
}
9594
);

0 commit comments

Comments
 (0)