From 4a8b87e2cd048e21a885c99ccb6c1abe31c866e5 Mon Sep 17 00:00:00 2001 From: huntedbytheirs Date: Tue, 4 Aug 2026 14:22:46 -0400 Subject: [PATCH] fix: use find instead of ls for clang detection in CI ls returns exit code 2 when glob has no matches, which fails the build step under set -e + pipefail. find returns 0 even when no files are found. --- .gitea/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b367751..25ed73c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -38,9 +38,10 @@ jobs: - name: Build kappa run: | - CC=$(ls /usr/bin/clang-1[5-9] /usr/bin/clang-2[0-9] 2>/dev/null | head -1) + CC=$(find /usr/bin -maxdepth 1 \( -name 'clang-1[5-9]' -o -name 'clang-2[0-9]' \) 2>/dev/null | head -1) if [ -z "$CC" ]; then CC=/usr/bin/clang-18; fi CXX="${CC}++" + echo "Using compiler: $CXX" cmake -B build -G Ninja \ -DCMAKE_C_COMPILER="$CC" \ -DCMAKE_CXX_COMPILER="$CXX"