File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,16 @@ task buildElasticsearchLocalDistro(dependsOn: unzipDownloadedElasticsearchSource
243
243
ignoreExitValue true // handled in doLast
244
244
doLast {
245
245
def exitValue = executionResult. get(). exitValue
246
- assert exitValue == 0 : " Elasticsearch build failed; logs available in ${ logFile.path} "
246
+ if (exitValue != 0 ) {
247
+ if (logFile. exists()) {
248
+ println " \n ===== Elasticsearch Build Log ====="
249
+ println logFile. text
250
+ println " ===== End of Build Log =====\n "
251
+ } else {
252
+ " Elasticsearch build failed and ${ logFile.path} log does not exist"
253
+ }
254
+ throw new GradleException (" Elasticsearch build failed, see the logs for details." )
255
+ }
247
256
assert ext. localDistroResult. isPresent() : " Elasticsearch did not produce exactly one localdistro build"
248
257
}
249
258
}
You can’t perform that action at this time.
0 commit comments