From e7ef0f7a6cbdafcffcb94083eaee1af73c17df9f Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 17 Feb 2021 04:07:30 -0500 Subject: [PATCH] test: Set default column size if $TERM env var isn't set Seems Github actions breaks or unsets this, leading to the errors: tput: No value for $TERM and no -T specified seq: missing operand Try 'seq --help' for more information. Hopefully this makes things a bit more robust. --- test/test-shell.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-shell.sh b/test/test-shell.sh index 2ac2a79b..5155c2dc 100755 --- a/test/test-shell.sh +++ b/test/test-shell.sh @@ -18,7 +18,8 @@ if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then exit 1 fi -LINE=$(printf '=%.0s' `seq -s ' ' $(tput cols)`) # a terminal width string +COLS="$(tput cols 2>/dev/null || echo 80)" # github-actions has no $TERM +LINE=$(printf '=%.0s' `seq -s ' ' $COLS`) # a terminal width string DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" # dir! cd "$DIR" >/dev/null # work from main mgmt directory failures=""