Merge pull request #543 from corda/feature/migration_tool_cfg_fix

config parsing non-strict
This commit is contained in:
Tudor Malene 2018-03-12 13:22:50 +00:00 committed by GitHub
commit 065fdbf647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ private fun runCommand(options: OptionSet, parser: OptionParser) {
}
private fun handleCommand(options: OptionSet, baseDirectory: Path, configFile: Path, mode: Mode, classLoader: ClassLoader, schemas: Set<MappedSchema>) {
val config = ConfigFactory.parseFile(configFile.toFile()).resolve().parseAs(Configuration::class)
val config = ConfigFactory.parseFile(configFile.toFile()).resolve().parseAs(Configuration::class, false)
fun runMigrationCommand(withMigration: (SchemaMigration) -> Unit): Unit = runWithDataSource(config) { dataSource ->
withMigration(SchemaMigration(schemas, dataSource, true, config.database, classLoader))