Merged in clint-node-driver-conf-fix (pull request #275)

Config will error earlier if the reference.conf file is missing.
This commit is contained in:
Clinton Alexander 2016-08-15 15:53:50 +01:00
commit c5a6d11976

View File

@ -36,7 +36,7 @@ interface NodeConfiguration {
val log = LoggerFactory.getLogger("NodeConfiguration")
fun loadConfig(baseDirectoryPath: Path, configFileOverride: Path? = null, allowMissingConfig: Boolean = false, configOverrides: Map<String, Any?> = emptyMap()): Config {
val defaultConfig = ConfigFactory.parseResources("reference.conf")
val defaultConfig = ConfigFactory.parseResources("reference.conf", ConfigParseOptions.defaults().setAllowMissing(false))
val normalisedBaseDir = baseDirectoryPath.normalize()
val configFile = (configFileOverride?.normalize() ?: normalisedBaseDir.resolve("node.conf")).toFile()