From 4052aee0707d45057522bd50d0171c38b2e5afad Mon Sep 17 00:00:00 2001 From: CoderDeltaLAN Date: Sun, 21 Jun 2026 02:30:29 +0100 Subject: [PATCH] dx: make check script ruff invocation portable --- scripts/check.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/check.sh b/scripts/check.sh index 1ed2c27..92b22dc 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -8,7 +8,14 @@ printf '\n== unit tests ==\n' PYTHONPATH=src python -m unittest discover -s tests -p 'test_*.py' printf '\n== ruff ==\n' -python -m ruff check . +if python -m ruff --version >/dev/null 2>&1; then + python -m ruff check . +elif command -v ruff >/dev/null 2>&1; then + ruff check . +else + printf '%s\n' 'ERROR: ruff is required. Install development tools with: python -m pip install -e ".[dev]"' >&2 + exit 1 +fi printf '\n== text hygiene ==\n' python - <<'PY'