From 62263a35c5c3b62d2f9c3d3a8f3a5a9117c41290 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Thu, 6 Feb 2025 14:54:34 -0600 Subject: [PATCH] Fix Create parent directory for DAG report (#5752) [ci fast] Signed-off-by: Ben Sherman Co-authored-by: Paolo Di Tommaso --- .../src/main/groovy/nextflow/trace/GraphObserver.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nextflow/src/main/groovy/nextflow/trace/GraphObserver.groovy b/modules/nextflow/src/main/groovy/nextflow/trace/GraphObserver.groovy index 9fc99f8f3d..aa109d8ce8 100644 --- a/modules/nextflow/src/main/groovy/nextflow/trace/GraphObserver.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/trace/GraphObserver.groovy @@ -16,6 +16,7 @@ package nextflow.trace +import java.nio.file.Files import java.nio.file.Path import groovy.transform.PackageScope @@ -81,6 +82,10 @@ class GraphObserver implements TraceObserver { void onFlowComplete() { // -- normalise the DAG dag.normalize() + + // -- make sure parent path exists + file.parent?.mkdirs() + // -- render it to a file createRender().renderDocument(dag,file) }