fix: use nullish coalescing in loadDotEnv for Sonar S6606
sonar / sonar (push) Skipped
sonar / sonar (pull_request) Successful in 1m8s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-11 15:18:12 -03:00
co-authored by Cursor
parent d0d5d9a7a6
commit be25484fad
+1 -1
View File
@@ -12,7 +12,7 @@ export function loadDotEnv(cwd = process.cwd()): void {
if (i <= 0) continue;
const key = trimmed.slice(0, i).trim();
const value = trimmed.slice(i + 1).trim();
if (process.env[key] === undefined) process.env[key] = value;
process.env[key] ??= value;
}
} catch {
// optional .env