Skip to content

Commit a16dc4b

Browse files
Fixed prepare-commit-msg for ruff git hook (#490)
1 parent 3ac9d55 commit a16dc4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/contrib/02_continuous_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export files=$(git diff --staged --name-only HEAD | grep .py | sed -e "s,^,$(git
7272
if [[ $files != "" ]]
7373
then
7474
export ruff_output=$(ruff check --quiet $files)
75-
if [[ "$ruff_output" != 0 ]]
75+
if [[ "$ruff_output" != "" ]]
7676
then
7777
git interpret-trailers --in-place --trailer "$(echo "$ruff_output" | sed -e 's/^/#/')" "$COMMIT_MSG_FILE"
7878
git interpret-trailers --in-place --trailer "#!!!!!!!!!! WARNING: RUFF FAILED !!!!!!!!!!" "$COMMIT_MSG_FILE"

0 commit comments

Comments
 (0)