From 7ef80f10ab9b6422b164863762ae1a8ab2b5182a Mon Sep 17 00:00:00 2001 From: jyn Date: Sat, 29 Aug 2026 07:49:00 +0200 Subject: [PATCH] fix warnings when linkcheck is disabled --- .github/workflows/ci.yml | 6 ++++++ ci/linkcheck.sh | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4108ef8c2e..21e81036d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,12 @@ jobs: - name: Check build run: ENABLE_LINKCHECK=1 mdbook build + - name: Check build with link checking disabled + run: | + output=$(mktemp) + mdbook build 2>&1 | tee "$output" + ! grep -F "Broken pipe" "$output" + - name: Save cached Linkcheck id: cache-linkcheck-save if: ${{ !cancelled() && github.event_name == 'schedule' }} diff --git a/ci/linkcheck.sh b/ci/linkcheck.sh index 867b427eaf..ae0373f911 100755 --- a/ci/linkcheck.sh +++ b/ci/linkcheck.sh @@ -11,6 +11,9 @@ set_github_token() { if [ -z "$ENABLE_LINKCHECK" ] ; then echo "Skipping link check." + # mdBook writes the render context to extensions over stdin. + # Discard it so mdBook doesn't warn about a broken pipe. + cat > /dev/null exit 0 fi