Skip to content

Commit 3be825a

Browse files
authored
Update runWithProvider.js
1 parent cd800f2 commit 3be825a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

runWithProvider.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ const dotenv = require('dotenv');
22
const { execSync } = require('child_process');
33
const { existsSync } = require('fs');
44

5-
dotenv.config();
5+
if (process.env.NODE_ENV !== 'production') {
6+
dotenv.config();
7+
}
68

79
const { DATABASE_PROVIDER } = process.env;
810
const databaseProviderDefault = DATABASE_PROVIDER ?? 'postgresql';
@@ -49,4 +51,4 @@ try {
4951
} catch (error) {
5052
console.error(`Error executing command: ${command}`);
5153
process.exit(1);
52-
}
54+
}

0 commit comments

Comments
 (0)