We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c3a01e7 + 8adcd50 commit 0f9da9cCopy full SHA for 0f9da9c
1 file changed
lib/cli/table/Ascii.php
@@ -13,6 +13,7 @@
13
namespace cli\table;
14
15
use cli\Colors;
16
+use cli\Shell;
17
18
/**
19
* The ASCII renderer renders tables with ASCII borders.
@@ -35,7 +36,7 @@ class Ascii extends Renderer {
35
36
public function setWidths(array $widths) {
37
38
if ( is_null( $this->_constraintWidth ) ) {
- $this->_constraintWidth = (int) shell_exec( 'tput cols' );
39
+ $this->_constraintWidth = (int) Shell::columns();
40
}
41
$col_count = count( $widths );
42
$col_borders_count = $col_count * strlen( $this->_characters['border'] );
0 commit comments