diff --git a/metadock/engine.py b/metadock/engine.py index e458821..6c99df8 100644 --- a/metadock/engine.py +++ b/metadock/engine.py @@ -233,6 +233,8 @@ def build(self, schematics: Optional[list[str]] = None) -> MetadockProjectBuildR generated_documents.append(generated_document) if not generated_document.status.value == "nochange": + if not generated_filepath.parent.exists(): + os.makedirs(generated_filepath.parent) with generated_filepath.open("w") as handle: handle.write(str(compiled_document))