Skip to content

Commit 33143b0

Browse files
committed
Fix emailing on crash
1 parent 7c7e878 commit 33143b0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

main.nf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,8 +2925,10 @@ workflow.onComplete {
29252925
log.info "[nf-core/eager] Sent summary e-mail to $email_address (sendmail)"
29262926
} catch (all) {
29272927
// Catch failures and try with plaintext
2928-
def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ]
2929-
if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) {
2928+
def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ]
2929+
if (mqc_report == NULL) {
2930+
log.warn "[nf-core/eager] Could not attach MultiQC report to summary email"
2931+
} else if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) {
29302932
mail_cmd += [ '-A', mqc_report ]
29312933
}
29322934
mail_cmd.execute() << email_html

0 commit comments

Comments
 (0)