Skip to content

Commit c87977a

Browse files
committed
Merge branch 'fc/disable-checkwinsize'
* fc/disable-checkwinsize: test: fix for COLUMNS and bash 5
2 parents e5a14dd + 390b44e commit c87977a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/test-lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,12 @@ then
409409
verbose=t
410410
fi
411411

412+
# Since bash 5.0, checkwinsize is enabled by default which does
413+
# update the COLUMNS variable every time a non-builtin command
414+
# completes, even for non-interactive shells.
415+
# Disable that since we are aiming for repeatability.
416+
test -n "$BASH_VERSION" && shopt -u checkwinsize 2>/dev/null
417+
412418
# For repeatability, reset the environment to known value.
413419
# TERM is sanitized below, after saving color control sequences.
414420
LANG=C

0 commit comments

Comments
 (0)