utilities.sh: fix line count
This commit is contained in:
parent
4475ee9af8
commit
5aeba28d5c
|
@ -16,7 +16,7 @@ log_error() {
|
||||||
if [ -n "${error_file}" ] && [ -f "${error_file}" ]; then
|
if [ -n "${error_file}" ] && [ -f "${error_file}" ]; then
|
||||||
printf "\n### %s\n" "${error_msg}" >&2
|
printf "\n### %s\n" "${error_msg}" >&2
|
||||||
# shellcheck disable=SC2046
|
# 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
|
printf "~~~{%s (tail -30)}\n" "${error_file}" >&2
|
||||||
tail -n 30 "${error_file}" >&2
|
tail -n 30 "${error_file}" >&2
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue