Skip to content

Commit 378ddc8

Browse files
author
deepshekhardas
committed
fix: ensure .env.local overrides .env in CLI
Corrected the order of env file loading to follow standard precedence conventions where local and environment-specific files override the base .env file.
1 parent 6765252 commit 378ddc8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/cli-v3/src/utilities/dotEnv.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { resolve } from "node:path";
33
import { env } from "std-env";
44

55
const ENVVAR_FILES = [
6-
".env",
7-
".env.development",
8-
".env.local",
96
".env.development.local",
7+
".env.local",
8+
".env.development",
109
"dev.vars",
10+
".env",
1111
];
1212

1313
export function resolveDotEnvVars(cwd?: string, envFile?: string) {

0 commit comments

Comments
 (0)