File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
plugins/nf-prov/src/main/nextflow/prov Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ class ProvObserverFactory implements TraceObserverFactory {
3636
3737 @Override
3838 Collection<TraceObserver > create (Session session ) {
39- [ createProvObserver(session. config) ]
39+ final observer = createProvObserver(session. config)
40+ observer ? [ observer ] : []
4041 }
4142
4243 protected TraceObserver createProvObserver (Map config ) {
4344 final enabled = config. navigate(' prov.enabled' , true ) as Boolean
4445 if ( ! enabled )
45- return
46+ return null
4647
4748 final format = config. navigate(' prov.format' ) as String
4849 final file = config. navigate(' prov.file' , ' manifest.json' ) as String
@@ -55,8 +56,10 @@ class ProvObserverFactory implements TraceObserverFactory {
5556
5657 formats = config. navigate(' prov.formats' , formats) as Map
5758
58- if ( ! formats )
59- throw new AbortOperationException (" Config setting `prov.formats` is required to specify provenance output formats" )
59+ if ( ! formats ) {
60+ log. warn " Config setting `prov.formats` is not defined, no provenance reports will be produced"
61+ return null
62+ }
6063
6164 final patterns = config. navigate(' prov.patterns' , []) as List<String >
6265 new ProvObserver (formats, patterns)
You can’t perform that action at this time.
0 commit comments