From b03142eac87231e771dc66b0d6338c06dfbd89f0 Mon Sep 17 00:00:00 2001 From: Unsloth Date: Thu, 9 Jul 2026 03:04:26 -0700 Subject: [PATCH] Silence SIGPIPE noise in the launcher no-browser test grep -q exiting on first match SIGPIPEs the echo feeding it when the haystack is the whole installer, spamming 'write error: Broken pipe' in the CI job log. Feed grep from here-strings instead. --- tests/sh/test_launcher_no_browser.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sh/test_launcher_no_browser.sh b/tests/sh/test_launcher_no_browser.sh index 073168d0d0..ee9147a277 100755 --- a/tests/sh/test_launcher_no_browser.sh +++ b/tests/sh/test_launcher_no_browser.sh @@ -17,9 +17,11 @@ INSTALL_PS1="$SCRIPT_DIR/../../install.ps1" PASS=0 FAIL=0 +# Here-strings, not `echo | grep -q`: grep exiting on first match SIGPIPEs +# the echo on large haystacks, spamming "write error: Broken pipe" in CI logs. assert_contains() { _label="$1"; _haystack="$2"; _needle="$3" - if echo "$_haystack" | grep -qF -- "$_needle"; then + if grep -qF -- "$_needle" <<< "$_haystack"; then echo " PASS: $_label" PASS=$((PASS + 1)) else @@ -30,7 +32,7 @@ assert_contains() { assert_not_contains() { _label="$1"; _haystack="$2"; _needle="$3" - if echo "$_haystack" | grep -qF -- "$_needle"; then + if grep -qF -- "$_needle" <<< "$_haystack"; then echo " FAIL: $_label (found '$_needle' but should not)" FAIL=$((FAIL + 1)) else