fixed bug when there is no .env file and corrected prisma path

This commit is contained in:
qajus 2025-06-05 23:16:48 +02:00 committed by Rudi Regentonne
parent a68d43a7f3
commit 78cf086a47
4 changed files with 9 additions and 7 deletions

View file

@ -6,7 +6,7 @@
"echo generating prisma",
"yarn prisma generate",
"echo migrating database",
"yarn prisma migrate dev"
"yarn prisma migrate dev --name \"$(date +%Y%m%d%H%M%S)\""
],
"requiredKeys": [
{ "name": "DATABASE_URL", "generated": true },

View file

@ -33,11 +33,13 @@ if (fs.existsSync(".env")) {
missingConfigs.push(setting);
}
}
} else {
missingConfigs = config.requiredKeys;
}
if (missingConfigs.length < 1) {
// if it`s all set abort the installation
console.log("All required settings are already set in .env.");
if (missingConfigs.length < 1 ) {
// if it`s all set abort the installation
console.log("All required settings are already set in .env.");
} else {
// getting user input for the PostgreSQL username and password
console.log("generrating .env file");