diff --git a/test/python-black-check.sh b/test/python-black-check.sh index 2861047e..01dcc85d 100755 --- a/test/python-black-check.sh +++ b/test/python-black-check.sh @@ -13,4 +13,9 @@ if [ -z "$files" ]; then exit 77 fi +command -v black >/dev/null 2>&1 || { + echo >&2 "black is not installed" + exit 77 +} + black --check $files diff --git a/test/python-ruff-check.sh b/test/python-ruff-check.sh index fa2f7f2d..e053a0cb 100755 --- a/test/python-ruff-check.sh +++ b/test/python-ruff-check.sh @@ -13,4 +13,9 @@ if [ -z "$files" ]; then exit 77 fi +command -v ruff >/dev/null 2>&1 || { + echo >&2 "ruff is not installed" + exit 77 +} + ruff check $files diff --git a/tools/python-black.sh b/tools/python-black.sh index 748099b8..cd89abe5 100755 --- a/tools/python-black.sh +++ b/tools/python-black.sh @@ -13,4 +13,9 @@ if [ -z "$files" ]; then exit 77 fi +command -v black >/dev/null 2>&1 || { + echo >&2 "black is not installed" + exit 77 +} + black $files diff --git a/tools/python-ruff.sh b/tools/python-ruff.sh index 3bd01da8..1a3443df 100755 --- a/tools/python-ruff.sh +++ b/tools/python-ruff.sh @@ -13,4 +13,9 @@ if [ -z "$files" ]; then exit 77 fi +command -v ruff >/dev/null 2>&1 || { + echo >&2 "ruff is not installed" + exit 77 +} + ruff check --fix $files