From f512225df413980a5d69c7f01f3d078cbbcffb77 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 23 Feb 2025 23:48:05 -0700 Subject: [PATCH] verify: Fix line counting again --- usr/local/share/bastille/verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/verify.sh b/usr/local/share/bastille/verify.sh index 51dd4fee..b82b5d93 100644 --- a/usr/local/share/bastille/verify.sh +++ b/usr/local/share/bastille/verify.sh @@ -89,7 +89,7 @@ verify_template() { ## line count must match newline count # shellcheck disable=SC2046 # shellcheck disable=SC3003 - if [ $(wc -l "${_path}" | awk '{print $1}') -ne $(grep -c '\n' "${_path}") ]; then + if [ $(wc -l "${_path}" | awk '{print $1}') -ne "$(tr -d -c '\n' < "${_path}" | wc -c)" ]; then info "[${_hook}]:" error_notify "${BASTILLE_TEMPLATE}:${_hook} [failed]." error_notify "Line numbers don't match line breaks."