We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f134c7 commit a354506Copy full SHA for a354506
1 file changed
PgCodeGen.scala
@@ -787,7 +787,9 @@ object PgCodeGen {
787
Future.failed(Exception(s"Cannot find any .sql files in ${sourceDir.toPath()}"))
788
else Future.unit
789
_ = println("Generating Postgres models")
790
- db <- initGeneratorDatabase(useConnection)
+ db <- initGeneratorDatabase(useConnection).transformWith:
791
+ case Success(db) => Future.successful(db)
792
+ case Failure(err) => cleanup.flatMap(_ => Future.failed(err))
793
codegen = PgCodeGen(
794
pkgName = pkgName,
795
sourceFiles = sourceFiles,
0 commit comments