ENT-1698 - transform baseDirectory to an absolute path (#714)

This commit is contained in:
Tudor Malene 2018-04-11 10:41:31 +01:00 committed by GitHub
parent 2ba00780c3
commit aaf3bdacd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ data class Configuration(val dataSourceProperties: Properties, val database: Dat
private fun runCommand(options: OptionSet, parser: OptionParser) {
fun baseDirectory() = Paths.get(options.valueOf(BASE_DIRECTORY) as String).normalize()
fun baseDirectory() = Paths.get(options.valueOf(BASE_DIRECTORY) as String).toAbsolutePath().normalize()
val mode = options.valueOf(MODE) as Mode
fun configFile(defaultCfgName: String) = baseDirectory() / ((options.valueOf(CONFIG) as String?) ?: defaultCfgName)