forked from pub-solar/os
pre-commit hook: fix shellcheck SCSC2181
Check exit code directly with e.g. if mycmd; not indirectly with $? https://github.com/koalaman/shellcheck/wiki/SC2181
This commit is contained in:
parent
7ecfcf5814
commit
03e6c47086
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue