From 132c22683e48f05ad919c7db52c61e3565052c98 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sat, 26 Jun 2021 10:58:11 +0900 Subject: [PATCH] include/log: Fix invalid decision to read from stdin in log_highlight() Because the boundaries aren't correct, log_highlight() will attempt to read input from stdin if only one line was passed in positional parameters. This commit fixes the boundary so that log_highlight() will print any number of lines correctly, whether passed in positional parameters or via stdin. --- include/log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/log.sh b/include/log.sh index 5171206..d5e866b 100644 --- a/include/log.sh +++ b/include/log.sh @@ -135,7 +135,7 @@ log_highlight() { local lines=("${@:2}") echo "===== BEGIN $tag =====" - if (( ${#lines[@]} > 1 )); then + if (( ${#lines[@]} > 0 )); then local arg for arg in "${lines[@]}"; do -- 2.47.3