Skip to content

Commit

Permalink
fix(core): load .env after .env.local (#18746)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Aug 21, 2023
1 parent 5ff8722 commit 4a25576
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nx/bin/nx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function main() {
* - .env.local
*/
function loadDotEnvFiles() {
for (const file of ['.env', '.local.env', '.env.local']) {
for (const file of ['.local.env', '.env.local', '.env']) {
loadDotEnvFile({
path: file,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/tasks-runner/forked-process-task-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ export class ForkedProcessTaskRunner {
`.${task.target.target}.env`,

// Load base DotEnv Files at workspace root
`.env`,
`.local.env`,
`.env.local`,
`.env`,
];

for (const file of dotEnvFiles) {
Expand Down

0 comments on commit 4a25576

Please sign in to comment.