diff --git a/scripts/pre-commit b/scripts/pre-commit index c0e1923..343e543 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -17,8 +17,12 @@ PROM_VERSION="v2.28.1" function is_yaml() { local file=$1 - if [[ "${file}" == *.yaml* || "${file}" == *.yml* ]] && yq -v "${file}" ; then - return 0 + if [[ "${file}" == *.yaml* || "${file}" == *.yml* ]] ; then + if yq -v "${file}" ; then + return 0 + fi + + exit_code=1 fi return 1