From 680318cb31adf4e9d7ba41beb46be98c47d06f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Fri, 10 Jul 2026 02:42:12 +0300 Subject: [PATCH] Apply suggested fix to scripts/sync-docs.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- scripts/sync-docs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/sync-docs.py b/scripts/sync-docs.py index 4fd492f0..a627b849 100644 --- a/scripts/sync-docs.py +++ b/scripts/sync-docs.py @@ -49,6 +49,11 @@ def copy_images(beman_repo_path: Path, website_repo_path: Path): target_directory = task["target"] print(f"Copying images from {beman_images_path} to {target_directory}") + if not beman_images_path.exists(): + raise FileNotFoundError( + f"Source images directory does not exist: {beman_images_path}" + ) + # Remove the target_directory if it exists and create it again. if target_directory.exists(): shutil.rmtree(target_directory)