From a16dc4b4590602c5271c780e2489ca61a8586543 Mon Sep 17 00:00:00 2001 From: Thomas Baumann <39156931+brownbaerchen@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:01:52 +0200 Subject: [PATCH] Fixed prepare-commit-msg for ruff git hook (#490) --- docs/contrib/02_continuous_integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contrib/02_continuous_integration.md b/docs/contrib/02_continuous_integration.md index eae4f2a7c..f2fc594db 100644 --- a/docs/contrib/02_continuous_integration.md +++ b/docs/contrib/02_continuous_integration.md @@ -72,7 +72,7 @@ export files=$(git diff --staged --name-only HEAD | grep .py | sed -e "s,^,$(git if [[ $files != "" ]] then export ruff_output=$(ruff check --quiet $files) - if [[ "$ruff_output" != 0 ]] + if [[ "$ruff_output" != "" ]] then git interpret-trailers --in-place --trailer "$(echo "$ruff_output" | sed -e 's/^/#/')" "$COMMIT_MSG_FILE" git interpret-trailers --in-place --trailer "#!!!!!!!!!! WARNING: RUFF FAILED !!!!!!!!!!" "$COMMIT_MSG_FILE"