utilities.sh: fix line count

This commit is contained in:
Jérémy Lecour 2023-03-22 14:10:27 +01:00 committed by Jérémy Lecour
parent 4475ee9af8
commit 5aeba28d5c
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ log_error() {
if [ -n "${error_file}" ] && [ -f "${error_file}" ]; then
printf "\n### %s\n" "${error_msg}" >&2
# shellcheck disable=SC2046
if [ $(wc -l "${error_file}") -gt 30 ]; then
if [ $(wc -l "${error_file}" | cut -d " " -f 1) -gt 30 ]; then
printf "~~~{%s (tail -30)}\n" "${error_file}" >&2
tail -n 30 "${error_file}" >&2
else