mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-16 19:29:26 +02:00
14 lines
303 B
TypeScript
14 lines
303 B
TypeScript
import { existsSync } from "fs";
|
|
import { resolve } from "path";
|
|
import { config } from "dotenv";
|
|
|
|
const envCandidates = [".env.worktree", ".env"];
|
|
|
|
for (const filename of envCandidates) {
|
|
const path = resolve(process.cwd(), filename);
|
|
if (existsSync(path)) {
|
|
config({ path });
|
|
break;
|
|
}
|
|
}
|