We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39d34a4 commit c8e327bCopy full SHA for c8e327b
src/config/utils/env.ts
@@ -31,7 +31,12 @@ export async function readLocalEnvFile(flags: {
31
contentEnvFile = '';
32
}
33
34
- const localEnv = dotenv.parse(contentEnvFile);
+ let localEnv;
35
+ try {
36
+ localEnv = dotenv.parse(contentEnvFile);
37
+ } catch (err) {
38
+ throw new Error('Failed to parse .env file');
39
+ }
40
41
if (flags.loadSystemEnv && typeof flags.env !== 'undefined') {
42
for (const key of Object.keys(localEnv)) {
0 commit comments