From 5aeba28d5c6cd4982a08a1c72190f2b3ab63fdae Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 22 Mar 2023 14:10:27 +0100 Subject: [PATCH] utilities.sh: fix line count --- client/lib/utilities.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/lib/utilities.sh b/client/lib/utilities.sh index 0f48077..4b07c86 100644 --- a/client/lib/utilities.sh +++ b/client/lib/utilities.sh @@ -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