Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

Commit 7f3f409

Browse files
committed
CliExecutioner: added null handling for result.response (#12)
1 parent 6499bc0 commit 7f3f409

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/mkring/wildlydeplyplugin/CliExecutioner.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ object CliExecutioner {
2121
println("going to execute `$it`")
2222
val result = cli.cmd(it)
2323
println("result: ${result.isSuccess}")
24-
result.response.get("result").asString().let {
24+
result.response?.get("result")?.asString()?.let {
2525
println("result string:\n$it")
26-
}
26+
} ?: run { println("response null") }
2727
}
2828

2929
cli.disconnect()

0 commit comments

Comments
 (0)