From 113313f60ad9a648b3985c9da928bed569223c47 Mon Sep 17 00:00:00 2001 From: az Date: Thu, 16 Feb 2023 18:30:22 +0100 Subject: [PATCH] [skip ci] remove unsafe-operator --- .../provs/desktop/application/CliArgumentsParser.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/application/CliArgumentsParser.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/application/CliArgumentsParser.kt index 9cf40e7..89d8aec 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/application/CliArgumentsParser.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/application/CliArgumentsParser.kt @@ -1,6 +1,7 @@ package org.domaindrivenarchitecture.provs.desktop.application import kotlinx.cli.ArgType +import kotlinx.cli.ExperimentalCli import kotlinx.cli.Subcommand import org.domaindrivenarchitecture.provs.configuration.application.CliTargetParser import org.domaindrivenarchitecture.provs.configuration.domain.ConfigFileName @@ -10,6 +11,7 @@ import org.domaindrivenarchitecture.provs.desktop.domain.DesktopOnlyModule import org.domaindrivenarchitecture.provs.desktop.domain.DesktopType +@OptIn(ExperimentalCli::class) open class CliArgumentsParser(name: String) : CliTargetParser(name) { private val modules: List = listOf(Basic(), Office(), Ide()) @@ -55,7 +57,7 @@ open class CliArgumentsParser(name: String) : CliTargetParser(name) { override fun execute() { configFileName = cliConfigFileName?.let { ConfigFileName(it) } parsed = true - onlyModules = if (only != null) listOf(only!!.name.lowercase()) else null + onlyModules = only?.let { listOf(it.name.lowercase()) } } }