From ed2e9777c970f81937fc951b2cf8a857701a87ab Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 26 Jun 2025 11:24:31 -0700 Subject: [PATCH] build-help-center: Don't fail the first time. --- tools/convert-help-center-docs-to-mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/convert-help-center-docs-to-mdx b/tools/convert-help-center-docs-to-mdx index abbfd67f38..3d2e097cf5 100755 --- a/tools/convert-help-center-docs-to-mdx +++ b/tools/convert-help-center-docs-to-mdx @@ -592,9 +592,11 @@ def run() -> None: include_output_dir = os.path.join(output_dir, "include") print("Starting the conversion from MD to MDX...") - # We delete the directory first to remove any stale files - # that might have been deleted in the `help` folder but - # their converted mdx files stay around + # We delete the directory first to remove any stale files that + # might have been deleted in the `help` folder but their converted + # mdx files stay around. We create it first just in case to avoid + # rmtree throwing exceptions. + os.makedirs(output_dir, exist_ok=True) shutil.rmtree(output_dir) os.makedirs(output_dir, exist_ok=True)