From 2b8be2388de410a10f5f9d0f228d6c0ceacc26cb Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sat, 7 Feb 2026 19:41:08 -0500 Subject: [PATCH] fix: skip Perl lint when modules missing instead of failing --- scripts/science/lint-all-sdks.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/science/lint-all-sdks.sh b/scripts/science/lint-all-sdks.sh index 94cc1ef..e8a69a4 100755 --- a/scripts/science/lint-all-sdks.sh +++ b/scripts/science/lint-all-sdks.sh @@ -88,7 +88,21 @@ fi # Perl SDKs echo "Perl SDKs:" if command -v perl &>/dev/null; then - lint_sdk "perl-sync" "perl -c '$CLIENTS_DIR/perl/sync/src/un.pl'" "$CLIENTS_DIR/perl/sync/src/un.pl" + # perl -c loads modules which may not be installed, so check for missing module errors + PERL_OUTPUT=$(perl -c "$CLIENTS_DIR/perl/sync/src/un.pl" 2>&1) + PERL_EXIT=$? + if [[ $PERL_EXIT -eq 0 ]]; then + echo " [PASS] perl-sync" + PASSED=$((PASSED + 1)) + DETAILS="$DETAILS\n " + elif echo "$PERL_OUTPUT" | grep -q "Can't locate"; then + echo " [SKIP] perl-sync - missing Perl modules (LWP::UserAgent, etc.)" + else + echo " [FAIL] perl-sync" + echo " $PERL_OUTPUT" | head -3 + FAILED=$((FAILED + 1)) + DETAILS="$DETAILS\n $PERL_OUTPUT" + fi else echo " [SKIP] Perl not installed" fi