Update command flow
Catch invalid server type befor creating provInstance
This commit is contained in:
parent
6e2d669af5
commit
81350db43d
1 changed files with 4 additions and 5 deletions
|
@ -34,12 +34,11 @@ fun main(args: Array<String>) {
|
||||||
println("Application file not found. Please check if path is correct.")
|
println("Application file not found. Please check if path is correct.")
|
||||||
exitProcess(1)
|
exitProcess(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
val prov = createProvInstance(cmd.target)
|
|
||||||
|
|
||||||
if (!cmd.isValidServerType()) {
|
if (!cmd.isValidServerType()) {
|
||||||
throw RuntimeException("Unknown serverType. Currently only k3s is accepted.")
|
throw RuntimeException("Unknown serverType. Currently only k3s is accepted.")
|
||||||
} else {
|
|
||||||
prov.provisionK3s(cmd as K3sCliCommand)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val prov = createProvInstance(cmd.target)
|
||||||
|
prov.provisionK3s(cmd as K3sCliCommand)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue