fix compiler warnings
This commit is contained in:
parent
1493977672
commit
038c775c3f
4 changed files with 3 additions and 4 deletions
|
@ -126,7 +126,7 @@ fun provisionRemote(args: Array<String>) {
|
|||
val pwSecret = PromptSecretSource("Password for user $userName on $host").secret()
|
||||
val pwFromSecret = Password(pwSecret.plain())
|
||||
|
||||
val config = getConfig() ?: WorkplaceConfig()
|
||||
val config = getConfig()
|
||||
Prov.newInstance(RemoteProcessor(host, userName, pwFromSecret)).provisionWorkplace(
|
||||
config.type,
|
||||
config.ssh?.keyPair(),
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.domaindrivenarchitecture.provs.workplace.infrastructure.installDevOps
|
|||
/**
|
||||
* Use case for provisioning repos
|
||||
*/
|
||||
fun Prov.provision(conf: WorkplaceConfig, let: Password?) = def {
|
||||
fun Prov.provision(conf: WorkplaceConfig) = def {
|
||||
if (conf.type == WorkplaceType.IDE) {
|
||||
installDevOps()
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ private fun provision(cliCommand: CliCommand) {
|
|||
val password: Secret? = retrievePassword(cliCommand)
|
||||
val prov: Prov = createProvInstance(cliCommand, password)
|
||||
|
||||
prov.provision(conf, password?.let { Password(password.plain()) })
|
||||
prov.provision(conf)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
println(
|
||||
"Error: File\u001b[31m $filename \u001b[0m was not found.\n" +
|
||||
|
|
|
@ -36,7 +36,6 @@ internal class ProvisionWorkplaceKtTest {
|
|||
// when
|
||||
// in order to test WorkplaceType.OFFICE: fix installing libreoffice for a fresh container as it hangs the first time but succeeds 2nd time
|
||||
val config = getConfig("src/test/resources/WorkplaceConfigExample.json")
|
||||
?: throw Exception("Could not read WorkplaceConfig")
|
||||
val res = a.provisionWorkplace(
|
||||
config.type,
|
||||
config.ssh?.keyPair(),
|
||||
|
|
Loading…
Reference in a new issue