Skip to content

Commit c772899

Browse files
committed
print logs if error
1 parent bfbd4dd commit c772899

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

helm/polaris/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,8 @@ fun Exec.runShellScript(script: String, outputFile: File) {
244244
doLast {
245245
val exitValue = executionResult.get().exitValue
246246
if (exitValue != 0) {
247-
this.logger.error("Shell script failed with exit code $exitValue.")
248-
this.logger.error("To identify the cause of the failure, inspect the logs:")
249-
this.logger.error(outputFile.absolutePath)
247+
this.logger.error("Shell script failed with exit code $exitValue:\n")
248+
outputFile.readLines().forEach { this.logger.error(it) }
250249
throw GradleException("Shell script failed with exit code $exitValue")
251250
}
252251
}

0 commit comments

Comments
 (0)