Skip to content

Commit 649c9d8

Browse files
authored
Merge pull request #198 from laraPPr/Fix_copy_buildlogs
Fix copy buildlogs
2 parents f453fe9 + 27b6bd6 commit 649c9d8

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

EESSI-install-software.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)