Skip to content

Commit 6f29b7d

Browse files
authored
fix: legacyDevProcessCwdBehaviour defaults to true (#2387)
This fixes an issue with prisma not being able to locate the native add-on binary
1 parent ed07bf9 commit 6f29b7d

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.changeset/afraid-waves-divide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Make the default of legacyDevProcessCwdBehaviour true instead of false (prevents breaking prismaExtension)

packages/cli-v3/src/dev/devSupervisor.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,12 @@ class DevSupervisor implements WorkerRuntime {
358358
config: this.options.config,
359359
});
360360

361-
const cwd =
362-
this.options.config.legacyDevProcessCwdBehaviour === true
363-
? undefined
364-
: worker.build.outputPath;
361+
const legacyDevProcessCwdBehaviour =
362+
typeof this.options.config.legacyDevProcessCwdBehaviour === "boolean"
363+
? this.options.config.legacyDevProcessCwdBehaviour
364+
: true;
365+
366+
const cwd = legacyDevProcessCwdBehaviour === true ? undefined : worker.build.outputPath;
365367

366368
//new run
367369
runController = new DevRunController({

packages/core/src/v3/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ export type TriggerConfig = {
280280
processKeepAlive?: ProcessKeepAlive;
281281

282282
/**
283-
* @default false
283+
* @default true
284284
* @description If set to true when running the dev CLI, the current working directory will be set to where the command is run from.
285285
*
286-
* The new default (when this flag isn't passed) is to set the current working directory to the build directory.
286+
* Setting this to `false` will set the current working directory to the build directory.
287287
* This more closely matches the behavior of the CLI when running in production and is highly recommended.
288288
*
289289
* This impacts the value of process.cwd() in your task code.

0 commit comments

Comments
 (0)