diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 396e9b0..69928f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,8 +31,8 @@ jobs: run: | set +x formatted_files=$(find ./config ./src ./tools -newer /tmp/pre_fmt) - num_formatted_files=$(find ./config ./src ./tools -newer /tmp/pre_fmt | wc -l) - echo $num_formatted_files + num_formatted_files=$(echo "$formatted_files" | wc -l) + if [ "$num_formatted_files" -gt "0" ]; then echo "❌🔥 Bad code detected! The following files would be reformatted:" echo "$formatted_files"