git » homepage.git » commit 91eefdf

Harden Markdown renderer discovery

author Alan Dipert
2026-07-16 16:11:44 UTC
committer Alan Dipert
2026-07-16 16:11:44 UTC
parent 19187514f27b4e853efa6a0eee2f1b874b96226d

Harden Markdown renderer discovery

tools/check_links.py +5 -2

diff --git a/tools/check_links.py b/tools/check_links.py
index 80ff898..b49fe63 100755
--- a/tools/check_links.py
+++ b/tools/check_links.py
@@ -32,8 +32,11 @@ def _cmark_cmd() -> list[str]:
 
     for candidate in candidates:
         if isinstance(candidate, pathlib.Path):
-            if candidate.is_file() and os.access(candidate, os.X_OK):
-                return [str(candidate)]
+            try:
+                if candidate.is_file() and os.access(candidate, os.X_OK):
+                    return [str(candidate)]
+            except OSError:
+                continue
         else:
             resolved = shutil.which(candidate)
             if resolved: