Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-waves-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---

Make the default of legacyDevProcessCwdBehaviour true instead of false (prevents breaking prismaExtension)
10 changes: 6 additions & 4 deletions packages/cli-v3/src/dev/devSupervisor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/v3/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading