From 416c0e6d2afbad98e6822973661b1416a5d0d896 Mon Sep 17 00:00:00 2001 From: Asa DeGroff Date: Mon, 16 Feb 2026 22:26:05 -0700 Subject: [PATCH] fix: resolve SIGPIPE false negative in library detection under pipefail `grep -q` exits immediately after the first match without consuming the rest of its input. When `ldconfig -p` is still writing to the pipe, this causes SIGPIPE (exit 141). Under the script's `set -o pipefail`, the pipeline returns 141 instead of 0, making `have_shared_lib_soname` report libraries as missing even when they are installed. Replace `grep -q` with `grep ... >/dev/null 2>&1` so grep reads all input before exiting, avoiding the broken pipe. Co-Authored-By: Claude Opus 4.6 --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a18ae4d..d217c7d 100644 --- a/install.sh +++ b/install.sh @@ -182,7 +182,7 @@ have_shared_lib_soname() { local soname="$1" if command -v ldconfig >/dev/null 2>&1; then - ldconfig -p 2>/dev/null | grep -q "$soname" + ldconfig -p 2>/dev/null | grep "$soname" >/dev/null 2>&1 return $? fi