Skip to content

Commit a53dc03

Browse files
committed
chore - deno 2 dotenv
1 parent e8fb291 commit a53dc03

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/quarto-core/dotenv.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ const kQuartoEnvRequired = `${kQuartoEnv}.required`;
2020
// read the QUARTO_PROFILE from dotenv if it's there
2121
export async function dotenvQuartoProfile(projectDir: string) {
2222
// read config
23-
const conf = await config({
24-
defaultsPath: join(projectDir, kQuartoEnv),
23+
const conf1 = await config({
24+
envPath: join(projectDir, kQuartoEnv),
25+
});
26+
const conf2 = await config({
2527
envPath: join(projectDir, kQuartoEnvLocal),
2628
});
2729

2830
// return profile if we have it
29-
return conf[kQuartoProfile];
31+
return conf2[kQuartoProfile] || conf1[kQuartoProfile] || "";
3032
}
3133

3234
// process dotenv files -- note that we track the processing we have done
@@ -84,8 +86,6 @@ export async function dotenvSetVariables(projectDir: string) {
8486
// seems to indicate that we shouldn't be using examplePath here...
8587
await config({
8688
envPath: definedEnvTempPath,
87-
examplePath: dotenvRequired,
88-
allowEmptyValues: true,
8989
});
9090
}
9191

0 commit comments

Comments
 (0)