Skip to content

Commit ada4c7d

Browse files
committed
chore - deno 2 dotenv
1 parent 5e2a787 commit ada4c7d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/core/quarto.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,19 @@ export const quartoConfig = {
6060
},
6161
dotenv: async (forceReload?: boolean): Promise<Record<string, string>> => {
6262
if (forceReload || !dotenvConfig) {
63+
const defaultOptions: ConfigOptions = {
64+
envPath: join(quartoConfig.sharePath(), "env", "env.defaults"),
65+
};
66+
dotenvConfig = await config(defaultOptions);
6367
const options: ConfigOptions = {
64-
defaultsPath: join(quartoConfig.sharePath(), "env", "env.defaults"),
65-
// On dev mode only (QUARTO_DEBUG='true'), we load the .env file in root quarto-cli project
6668
envPath: quartoConfig.isDebug()
6769
? join(quartoConfig.sharePath(), "..", "..", ".env")
6870
: null,
69-
// we don't want any `.env.example` o be loaded, especially one from working dir
70-
// https://github.com/quarto-dev/quarto-cli/issues/9262
71-
examplePath: null,
7271
};
73-
dotenvConfig = await config(options);
72+
const otherConfig = await config(options);
73+
for (const key of Object.keys(otherConfig)) {
74+
dotenvConfig[key] = otherConfig[key];
75+
}
7476
}
7577
return dotenvConfig;
7678
},

0 commit comments

Comments
 (0)