ci: use find instead of ls for shellcheck SC2012

This commit is contained in:
chopratejas 2026-04-26 10:20:18 -07:00
parent dd0697a7c9
commit 7bb9cfe7d4

View file

@ -71,7 +71,7 @@ jobs:
maturin build --release -m crates/headroom-py/Cargo.toml --out dist
pip install --force-reinstall --no-deps dist/headroom_core_py-*.whl
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
SO_FILE=$(ls "$SITE_PACKAGES"/headroom/_core.cpython-*.so 2>/dev/null | head -1)
SO_FILE=$(find "$SITE_PACKAGES/headroom" -maxdepth 1 -name "_core.cpython-*.so" -print -quit 2>/dev/null)
if [[ -z "$SO_FILE" ]]; then
echo "error: could not find _core.cpython-*.so under $SITE_PACKAGES/headroom/" >&2
ls -la "$SITE_PACKAGES/headroom/" || true