From 4427817ff6d3bf224dbd3b16070ce79a0b13e5fb Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Wed, 13 Aug 2025 14:21:53 +0100 Subject: [PATCH] fix: legacyDevProcessCwdBehaviour defaults to true This fixes an issue with prisma not being able to locate the native add-on binary --- .changeset/afraid-waves-divide.md | 5 +++++ packages/cli-v3/src/dev/devSupervisor.ts | 10 ++++++---- packages/core/src/v3/config.ts | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/afraid-waves-divide.md diff --git a/.changeset/afraid-waves-divide.md b/.changeset/afraid-waves-divide.md new file mode 100644 index 0000000000..3ab19fb2df --- /dev/null +++ b/.changeset/afraid-waves-divide.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +Make the default of legacyDevProcessCwdBehaviour true instead of false (prevents breaking prismaExtension) diff --git a/packages/cli-v3/src/dev/devSupervisor.ts b/packages/cli-v3/src/dev/devSupervisor.ts index a445748473..fdbc3795fb 100644 --- a/packages/cli-v3/src/dev/devSupervisor.ts +++ b/packages/cli-v3/src/dev/devSupervisor.ts @@ -358,10 +358,12 @@ class DevSupervisor implements WorkerRuntime { config: this.options.config, }); - const cwd = - this.options.config.legacyDevProcessCwdBehaviour === true - ? undefined - : worker.build.outputPath; + const legacyDevProcessCwdBehaviour = + typeof this.options.config.legacyDevProcessCwdBehaviour === "boolean" + ? this.options.config.legacyDevProcessCwdBehaviour + : true; + + const cwd = legacyDevProcessCwdBehaviour === true ? undefined : worker.build.outputPath; //new run runController = new DevRunController({ diff --git a/packages/core/src/v3/config.ts b/packages/core/src/v3/config.ts index 08d1e90359..b5caba64b9 100644 --- a/packages/core/src/v3/config.ts +++ b/packages/core/src/v3/config.ts @@ -280,10 +280,10 @@ export type TriggerConfig = { processKeepAlive?: ProcessKeepAlive; /** - * @default false + * @default true * @description If set to true when running the dev CLI, the current working directory will be set to where the command is run from. * - * The new default (when this flag isn't passed) is to set the current working directory to the build directory. + * Setting this to `false` will set the current working directory to the build directory. * This more closely matches the behavior of the CLI when running in production and is highly recommended. * * This impacts the value of process.cwd() in your task code.