Skip to content

Commit

Permalink
Merge pull request #62 from wp-cli/use-shell-method
Browse files Browse the repository at this point in the history
Use `Shell::columns()` instead of rolling our own method
  • Loading branch information
danielbachhuber committed Aug 10, 2014
2 parents c3a01e7 + 8adcd50 commit 0f9da9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli/table/Ascii.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
namespace cli\table;

use cli\Colors;
use cli\Shell;

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

if ( is_null( $this->_constraintWidth ) ) {
$this->_constraintWidth = (int) shell_exec( 'tput cols' );
$this->_constraintWidth = (int) Shell::columns();
}
$col_count = count( $widths );
$col_borders_count = $col_count * strlen( $this->_characters['border'] );
Expand Down

0 comments on commit 0f9da9c

Please sign in to comment.