2
0

🐛 Fix return executeCommand result

Closes #1259
This commit is contained in:
Baptiste Arnaud
2024-02-19 16:32:42 +01:00
parent 5879c89ee6
commit 219b2295b4

View File

@ -22,11 +22,12 @@ export const executePrismaCommand = (command: string, options?: Options) => {
if (!databaseUrl) {
console.error('Could not find DATABASE_URL in environment')
process.exit(1)
return
}
if (databaseUrl?.startsWith('mysql://')) {
console.log('Executing for MySQL schema')
executeCommand(`${command} --schema ${mysqlSchemaPath}`)
return executeCommand(`${command} --schema ${mysqlSchemaPath}`)
}
if (
@ -34,7 +35,7 @@ export const executePrismaCommand = (command: string, options?: Options) => {
databaseUrl?.startsWith('postgresql://')
) {
console.log('Executing for PostgreSQL schema')
executeCommand(`${command} --schema ${postgesqlSchemaPath}`)
return executeCommand(`${command} --schema ${postgesqlSchemaPath}`)
}
console.error(