Skip to content

Commit 13d920f

Browse files
correctly configure python workers when no command line script is provided
1 parent 7dca7b8 commit 13d920f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/wrangler/src/config/validation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export type NormalizeAndValidateConfigArgs = {
6060
remote?: boolean;
6161
localProtocol?: string;
6262
upstreamProtocol?: string;
63+
script?: string;
6364
};
6465

6566
const ENGLISH = new Intl.ListFormat("en-US");
@@ -329,7 +330,7 @@ function applyPythonConfig(
329330
config: Config,
330331
args: NormalizeAndValidateConfigArgs
331332
) {
332-
const mainModule = "script" in args ? args.script : config.main;
333+
const mainModule = args.script ?? config.main;
333334
if (typeof mainModule === "string" && mainModule.endsWith(".py")) {
334335
// Workers with a python entrypoint should have bundling turned off, since all of Wrangler's bundling is JS/TS specific
335336
config.no_bundle = true;

0 commit comments

Comments
 (0)