Skip to content

Commit

Permalink
creating generated_documents subdir if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sillman committed Nov 27, 2023
1 parent d3a950c commit 41ead29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metadock/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 41ead29

Please sign in to comment.