From d3be5ad8e727a3d6d3519467c9608a5367d0abc7 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 8 Aug 2026 22:54:16 +0200 Subject: [PATCH] Do not let the change listing kill the publish step The first successful run got as far as listing what it was about to publish and then died with exit 141: M apidocs/org/codehaus/plexus/util/StringUtils.html ... ##[error]Process completed with exit code 141 141 is SIGPIPE. The listing was "git status --short | head -50"; head exits after 50 lines, git status is killed writing to the closed pipe, and under `set -o pipefail` that becomes the exit status of the whole pipeline, which `set -e` then treats as fatal. It only shows up when the output exceeds the pipe buffer, so a small site would have published fine and a large one would not - plexus-utils regenerates thousands of apidocs files. Uses sed, which reads to end of input rather than exiting early, and reports how many files were truncated from the listing. Nothing was published in the failed run: the step died before the commit. The clone, the token authentication and the rsync all worked, so the fix in #66 is sound. --- .github/workflows/site.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 57746ce..c1ec213 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -144,8 +144,14 @@ jobs: exit 0 fi - git status --short | head -50 - echo "$(git diff --cached --name-only | wc -l) file(s) changed" + # sed rather than head: head exits after 50 lines, which SIGPIPEs git status, + # and under `set -o pipefail` that aborts the whole step with exit 141 + changed=$(git diff --cached --name-only | wc -l) + git status --short | sed -n '1,50p' + if [ "$changed" -gt 50 ]; then + echo "... and $((changed - 50)) more" + fi + echo "$changed file(s) changed" if [ "$DRY_RUN" = "true" ]; then echo "::notice::dry run - not committing or pushing"