Skip to content

Commit 4a25576

Browse files
authored
fix(core): load .env after .env.local (#18746)
1 parent 5ff8722 commit 4a25576

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/nx/bin/nx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function main() {
108108
* - .env.local
109109
*/
110110
function loadDotEnvFiles() {
111-
for (const file of ['.env', '.local.env', '.env.local']) {
111+
for (const file of ['.local.env', '.env.local', '.env']) {
112112
loadDotEnvFile({
113113
path: file,
114114
});

packages/nx/src/tasks-runner/forked-process-task-runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ export class ForkedProcessTaskRunner {
437437
`.${task.target.target}.env`,
438438

439439
// Load base DotEnv Files at workspace root
440-
`.env`,
441440
`.local.env`,
442441
`.env.local`,
442+
`.env`,
443443
];
444444

445445
for (const file of dotEnvFiles) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy