Skip to content

Commit 0978aee

Browse files
lklimekclaude
andcommitted
fix(ci): prevent grep exit code 1 from failing dependency checks
When all binary dependencies are valid system libraries, `grep -Ev` filters out all lines and returns exit code 1 (no matches). Under `bash -e` (GitHub Actions default), this kills the script before it can report success. Add `|| true` to all grep commands inside command substitutions across Linux and macOS verification steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1bad487 commit 0978aee

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
DEPS=$(ldd dash-evo-tool/dash-evo-tool)
129129
echo "$DEPS"
130130
# Allowlist: only standard system libraries should appear
131-
UNEXPECTED=$(echo "$DEPS" | grep "=>" | grep -v "not found" | awk '{print $1}' | grep -Ev "^(linux-vdso|libm|libc|libdl|librt|libpthread|libgcc_s|libstdc\+\+|ld-linux|libz|libssl|libcrypto)\.so")
131+
UNEXPECTED=$(echo "$DEPS" | grep "=>" | grep -v "not found" | awk '{print $1}' | grep -Ev "^(linux-vdso|libm|libc|libdl|librt|libpthread|libgcc_s|libstdc\+\+|ld-linux|libz|libssl|libcrypto)\.so" || true)
132132
if [ -n "$UNEXPECTED" ]; then
133133
echo "::warning::Unexpected shared dependencies found:"
134134
echo "$UNEXPECTED"
@@ -279,14 +279,14 @@ jobs:
279279
DEPS=$(otool -L build/dash-evo-tool)
280280
echo "$DEPS"
281281
# Only system libraries (/usr/lib/) and frameworks (/System/Library/) are allowed
282-
UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)")
282+
UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)" || true)
283283
if [ -n "$UNEXPECTED" ]; then
284284
echo "::error::Binary links non-system libraries:"
285285
echo "$UNEXPECTED"
286286
exit 1
287287
fi
288288
# Warn on @rpath dependencies (acceptable for frameworks but worth noting)
289-
RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/")
289+
RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/" || true)
290290
if [ -n "$RPATH" ]; then
291291
echo "::warning::Binary has @rpath dependencies (verify these are bundled):"
292292
echo "$RPATH"
@@ -568,14 +568,14 @@ jobs:
568568
DEPS=$(otool -L build/dash-evo-tool)
569569
echo "$DEPS"
570570
# Only system libraries (/usr/lib/) and frameworks (/System/Library/) are allowed
571-
UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)")
571+
UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)" || true)
572572
if [ -n "$UNEXPECTED" ]; then
573573
echo "::error::Binary links non-system libraries:"
574574
echo "$UNEXPECTED"
575575
exit 1
576576
fi
577577
# Warn on @rpath dependencies (acceptable for frameworks but worth noting)
578-
RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/")
578+
RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/" || true)
579579
if [ -n "$RPATH" ]; then
580580
echo "::warning::Binary has @rpath dependencies (verify these are bundled):"
581581
echo "$RPATH"

0 commit comments

Comments
 (0)