summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-20 15:56:55 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-20 15:56:55 -0400
commitdd8ac68070176343a8781e67de4bbd6a071bb89d (patch)
treed6e730a2c49d338e706973c0857e63b2f94ea355 /tests
parent60366e4583a1d148dd5f8171c9148ebb98890478 (diff)
downloadbfs-dd8ac68070176343a8781e67de4bbd6a071bb89d.tar.xz
tests: Fix column detection with redirected stderr
Diffstat (limited to 'tests')
-rw-r--r--tests/run.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run.sh b/tests/run.sh
index 5fcccad..7b7fe24 100644
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -14,7 +14,7 @@ update_eol() {
# Bash gets $COLUMNS from stderr, so if it's redirected use tput instead
local cols="${COLUMNS-}"
if [ -z "$cols" ]; then
- cols=$(tput cols)
+ cols=$(tput cols 2>/dev/tty)
fi
# Put the cursor at the last column, then write a space so the next