Skip to content

Commit

Permalink
Split if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
DTLP committed Oct 4, 2023
1 parent 4c3de60 commit 322720a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 322720a

Please sign in to comment.