Skip to content

Commit 58a8d92

Browse files
committed
DATABASE_PROVIDER default is posttgresql #1
1 parent 185fb58 commit 58a8d92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

runWithProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ const { execSync } = require('child_process');
33
dotenv.config();
44

55
const { DATABASE_PROVIDER } = process.env;
6+
const databaseProviderDefault = DATABASE_PROVIDER ?? "postgresql"
67

78
if (!DATABASE_PROVIDER) {
8-
console.error('DATABASE_PROVIDER is not set in the .env file');
9-
DATABASE_PROVIDER = "postgresql"
9+
console.error(`DATABASE_PROVIDER is not set in the .env file, using default: ${databaseProviderDefault}`);
1010
// process.exit(1);
1111
}
1212

1313
const command = process.argv
1414
.slice(2)
1515
.join(' ')
16-
.replace(/\DATABASE_PROVIDER/g, DATABASE_PROVIDER);
16+
.replace(/\DATABASE_PROVIDER/g, databaseProviderDefault);
1717

1818
try {
1919
execSync(command, { stdio: 'inherit' });

0 commit comments

Comments
 (0)