File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,29 @@ build_failed() {
2828 echo " BUILD FAILED"
2929 echo
3030 echo " Inspect or clean up the working tree at ${TEMP_PATH} "
31- echo " Results logged to ${LOG_PATH} "
32- echo " Last 10 log lines:"
33- tail -n 10 $LOG_PATH
31+
32+ if file_is_not_empty " $LOG_PATH " ; then
33+ echo " Results logged to ${LOG_PATH} "
34+ echo
35+ echo " Last 10 log lines:"
36+ tail -n 10 " $LOG_PATH "
37+ fi
3438 } >&3
3539 exit 1
3640}
3741
42+ file_is_not_empty () {
43+ local filename=" $1 "
44+ local line_count=" $( wc -l " $filename " 2> /dev/null || true) "
45+
46+ if [ -n " $line_count " ]; then
47+ words=( $line_count )
48+ [ " ${words[0]} " -gt 0 ]
49+ else
50+ return 1
51+ fi
52+ }
53+
3854install_package () {
3955 install_package_using " tarball" 1 $*
4056}
You can’t perform that action at this time.
0 commit comments