mirror of
https://github.com/corda/corda.git
synced 2025-06-01 23:20:54 +00:00
ENT-1698 - transform baseDirectory to an absolute path (#714)
This commit is contained in:
parent
2ba00780c3
commit
aaf3bdacd5
@ -112,7 +112,7 @@ data class Configuration(val dataSourceProperties: Properties, val database: Dat
|
|||||||
|
|
||||||
private fun runCommand(options: OptionSet, parser: OptionParser) {
|
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
|
val mode = options.valueOf(MODE) as Mode
|
||||||
fun configFile(defaultCfgName: String) = baseDirectory() / ((options.valueOf(CONFIG) as String?) ?: defaultCfgName)
|
fun configFile(defaultCfgName: String) = baseDirectory() / ((options.valueOf(CONFIG) as String?) ?: defaultCfgName)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user