From 4547e43dda32edde9904cc4fa132213a1797cbca Mon Sep 17 00:00:00 2001 From: KaifAhmad1 Date: Sat, 20 Jun 2026 16:40:35 +0530 Subject: [PATCH] docs: show first 60 lines of mintlify output to identify failing page --- docs_check.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs_check.py b/docs_check.py index 5989cfe8..86095764 100644 --- a/docs_check.py +++ b/docs_check.py @@ -252,9 +252,13 @@ def _() -> list[str]: "could not be generated" not in combined: return [] # Windows temp-cleanup noise; real CI runs on Linux - # Surface the last 20 lines so the failing page error is visible - tail = "\n".join(combined.strip().splitlines()[-20:]) - return [f"mintlify export failed (exit {result.returncode}):\n{tail}"] + # Show first 60 lines (where per-page errors are logged) AND + # last 20 lines (where the summary error appears). + all_lines = combined.strip().splitlines() + head = "\n".join(all_lines[:60]) + tail = "\n".join(all_lines[-20:]) if len(all_lines) > 60 else "" + output = head + ("\n...\n" + tail if tail else "") + return [f"mintlify export failed (exit {result.returncode}):\n{output}"] return [] except FileNotFoundError: return ["npx not found — skipping Mintlify export check (Node.js required)"]