From b39509d52d84ff52617dd9d3240b59cb3d8ca2d4 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 9 May 2019 22:07:28 -0400 Subject: tests: Work around Bash 4 not updating $COLUMNS --- tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests.sh b/tests.sh index 93ac03c..9e2f830 100755 --- a/tests.sh +++ b/tests.sh @@ -2311,6 +2311,13 @@ function update_eol() { if [ -t 1 -a ! "$VERBOSE" ]; then BOL='\r\033[K' + + # Workaround for bash 4: checkwinsize is off by default. We can turn it on, + # but we also have to explicitly trigger a foreground job to finish so that + # it will update the window size before we use $COLUMNS + shopt -s checkwinsize + (:) + update_eol trap update_eol WINCH fi -- cgit v1.2.3