Settings: Is CLI is set, use it instead of INI.

This commit is contained in:
Fabian Schlenz 2018-04-11 05:51:00 +02:00
parent 38fce0ee5c
commit ff9163c1bb
1 changed files with 4 additions and 4 deletions

View File

@ -92,12 +92,12 @@ class Setting(val ini: Map<String, List<String>>, val cli: CommandLineOptions, v
val logger = LoggerFactory.getLogger(Setting::class.java)
init {
if (getIni(name) != null) {
values = getIni(name)!!
source = SettingSource.INI
} else if (getCli(name) != null) {
if (getCli(name) != null) {
values = listOf(getCli(name)!!)
source = SettingSource.CLI
} else if (getIni(name) != null) {
values = getIni(name)!!
source = SettingSource.INI
} else {
values = default
source = SettingSource.DEFAULT