Skip to content

Commit b33cbc4

Browse files
committed
Switch to legacyDevProcessCwdBehaviour
1 parent 2e7b197 commit b33cbc4

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,9 @@ class DevSupervisor implements WorkerRuntime {
359359
});
360360

361361
const cwd =
362-
this.options.config.devProcessCwdInBuildDir ??
363-
this.options.config.experimental_devProcessCwdInBuildDir
364-
? worker.build.outputPath
365-
: undefined;
362+
this.options.config.legacyDevProcessCwdBehaviour === true
363+
? undefined
364+
: worker.build.outputPath;
366365

367366
//new run
368367
runController = new DevRunController({

packages/core/src/v3/config.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,20 +279,16 @@ export type TriggerConfig = {
279279
*/
280280
processKeepAlive?: ProcessKeepAlive;
281281

282-
/**
283-
* This still works but use `devProcessCwdInBuildDir` instead.
284-
*
285-
* @deprecated (use devProcessCwdInBuildDir instead)
286-
*/
287-
experimental_devProcessCwdInBuildDir?: boolean;
288-
289282
/**
290283
* @default false
291-
* @description When running the dev CLI, set the current working directory to the build directory.
284+
* @description If set to true when running the dev CLI, the current working directory will be set to where the command is run from.
285+
*
286+
* The new default (when this flag isn't passed) is to set the current working directory to the build directory.
287+
* This more closely matches the behavior of the CLI when running in production and is highly recommended.
292288
*
293-
* Currently, the process.cwd() is set to the root of the project.
289+
* This impacts the value of process.cwd() in your task code.
294290
*/
295-
devProcessCwdInBuildDir?: boolean;
291+
legacyDevProcessCwdBehaviour?: boolean;
296292

297293
/**
298294
* @deprecated Use `dirs` instead

0 commit comments

Comments
 (0)