diff --git a/noxfile.py b/noxfile.py index d1e538c..03df2e1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -37,6 +37,8 @@ def svgs(session): @nox.session def docs(session): pdm_install(session, "docs") + Path("docs").mkdir(exist_ok=True) + if not Path("docs/svgs").is_dir(): svgs(session) diff --git a/scripts/generate-svgs.py b/scripts/generate-svgs.py index e10192c..d19548f 100755 --- a/scripts/generate-svgs.py +++ b/scripts/generate-svgs.py @@ -6,7 +6,7 @@ from textwrap import dedent from typing import Tuple DOCS_PATH = Path(__file__).parent.parent / "docs" -(SAVE_PATH := DOCS_PATH / "svgs").mkdir(exist_ok=True) +(SAVE_PATH := DOCS_PATH / "svgs").mkdir(exist_ok=True, parents=True) VIV = Path(__file__).parent.parent / "src" / "viv" / "viv.py" CLI_DOC_PATH = DOCS_PATH / "cli.md"