feat: rewrite the installer's three A && B || C constructs as guard clauses so shellcheck's SC2015 is satisfied on the CI runner's version, and print the shellcheck version in check-installer.sh

This commit is contained in:
Matthew Meszaros
2026-09-04 05:53:16 -07:00
parent d68bbcd2ab
commit f042e307e5
3 changed files with 18 additions and 5 deletions
+4 -1
View File
@@ -34,9 +34,12 @@ else
pass "parses (dash not installed; POSIX check was approximate)"
fi
# The version is printed because it matters: SC2015 and friends move between
# releases, so a local run that passes on a newer shellcheck than CI's is not
# the same check. When CI disagrees with you, this line is why.
if command -v shellcheck >/dev/null 2>&1; then
shellcheck -s sh "$SCRIPT" || fail "shellcheck found problems in the installer"
pass "shellcheck clean"
pass "shellcheck clean ($(shellcheck --version | awk '/^version:/ {print $2}'))"
else
echo "· shellcheck not installed; skipped"
fi