Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit 0f9da9c

Browse files
Merge pull request wp-cli#62 from wp-cli/use-shell-method
Use `Shell::columns()` instead of rolling our own method
2 parents c3a01e7 + 8adcd50 commit 0f9da9c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/cli/table/Ascii.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace cli\table;
1414

1515
use cli\Colors;
16+
use cli\Shell;
1617

1718
/**
1819
* The ASCII renderer renders tables with ASCII borders.
@@ -35,7 +36,7 @@ class Ascii extends Renderer {
3536
public function setWidths(array $widths) {
3637

3738
if ( is_null( $this->_constraintWidth ) ) {
38-
$this->_constraintWidth = (int) shell_exec( 'tput cols' );
39+
$this->_constraintWidth = (int) Shell::columns();
3940
}
4041
$col_count = count( $widths );
4142
$col_borders_count = $col_count * strlen( $this->_characters['border'] );

0 commit comments

Comments
 (0)