diff --git a/shell/hooks/pre-commit.sh b/shell/hooks/pre-commit.sh index 5d8ba2df..2a370734 100755 --- a/shell/hooks/pre-commit.sh +++ b/shell/hooks/pre-commit.sh @@ -20,8 +20,7 @@ if [[ -n "${nix_files[@]}" ]]; then fi # check editorconfig -editorconfig-checker -- "${all_files[@]}" -if [[ $? != '0' ]]; then +if ! editorconfig-checker -- "${all_files[@]}"; then printf "%b\n" \ "\nCode is not aligned with .editorconfig" \ "Review the output and commit your fixes" >&2