]> Sergey Matveev's repositories - bfs.git/blobdiff - tests/run.sh
tests: Fix column detection with redirected stderr
[bfs.git] / tests / run.sh
index 5fcccad34db7f0a64e7367486c0a12c64165aa71..7b7fe246fbb7b369ba75b93ae71697965b137e62 100644 (file)
@@ -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