CommandLineOptions will now insert booleans into values with an value of "true" as well.

This commit is contained in:
Fabian Schlenz 2018-04-10 06:11:01 +02:00
parent ec4097e777
commit e5da546386
1 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ class CommandLineOptions(args: Array<String>) {
if (arg.startsWith("--")) {
if (last_key!=null) {
booleans.add(last_key!!)
values.put(last_key!!, "true")
}
last_key = arg.substring(2)
} else {
@ -35,6 +36,9 @@ class CommandLineOptions(args: Array<String>) {
last_key = null
}
}
if (last_key!=null) booleans.add(last_key!!)
if (last_key!=null) {
booleans.add(last_key!!)
values.put(last_key!!, "true")
}
}
}