Skip to content

Commit ba1658c

Browse files
committed
Fixes the null directory generation when --help is used
1 parent 9c9f69d commit ba1658c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nextflow.config

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,24 @@ manifest {
109109
version = '0.1.0'
110110
}
111111

112+
// Generates execution reports
112113
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
114+
// Only enable reports if not showing help and output_dir is set
115+
def enableReports = !params.help && params.output_dir != null
113116
timeline {
114-
enabled = true
117+
enabled = enableReports
115118
file = "${params.output_dir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
116119
}
117120
report {
118-
enabled = true
121+
enabled = enableReports
119122
file = "${params.output_dir}/pipeline_info/execution_report_${trace_timestamp}.html"
120123
}
121124
trace {
122-
enabled = true
125+
enabled = enableReports
123126
file = "${params.output_dir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
124127
}
125128
dag {
126-
enabled = true
129+
enabled = enableReports
127130
file = "${params.output_dir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
128131
}
129132

0 commit comments

Comments
 (0)