From 7299d593da2242061f41c20f0a0cf5133c6e10df Mon Sep 17 00:00:00 2001 From: Kyle Mayes Date: Sun, 15 Oct 2023 01:04:38 -0400 Subject: [PATCH] Include command output in exception message --- .../src/main/kotlin/com/kylemayes/generator/support/Command.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt b/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt index 6be373c..990ccbd 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt @@ -62,7 +62,7 @@ private fun execute(command: String, args: Array, input: String? = null) process.waitFor(1, TimeUnit.SECONDS) process.destroyForcibly() val executed = "$command ${args.joinToString(" ")}".trim() - val message = "Failed to execute command ('$executed')." + val message = "Failed to execute command ('$executed'):\n${outputValue}" throw RuntimeException(message, errorValue ?: RuntimeException("Timed out.")) }