File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -412,12 +412,16 @@ else
412412
413413 # copy EasyBuild log file if EasyBuild exited with an error
414414 if [ ${ec} -ne 0 ]; then
415- eb_last_log=$( unset EB_VERBOSE; eb --last-log)
416- # copy to current working directory
417- cp -a ${eb_last_log} .
418- echo " Last EasyBuild log file copied from ${eb_last_log} to ${PWD} "
419- # copy to build logs dir (with context added)
420- copy_build_log " ${eb_last_log} " " ${build_logs_dir} "
415+ eb_last_log=$( eb --last-log | grep ^/.* \. log)
416+ # copy to current working directory if file exhists
417+ if [ -f ${eb_last_log} ]; then
418+ cp -a ${eb_last_log} .
419+ echo " Last EasyBuild log file copied from ${eb_last_log} to ${PWD} "
420+ # copy to build logs dir (with context added)
421+ copy_build_log " ${eb_last_log} " " ${build_logs_dir} "
422+ else
423+ fatal_error " Could not copy EasyBuild log file because ${eb_last_log} does not exist"
424+ fi
421425 fi
422426
423427 $TOPDIR /check_missing_installations.sh ${easystack_file} ${pr_diff}
You can’t perform that action at this time.
0 commit comments