Skip to content

Commit 733c452

Browse files
author
Ryan
committed
Try to fix error a little nicer
1 parent 03d2882 commit 733c452

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/cli/Shell.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class Shell {
2424
* @todo Test on more systems.
2525
*/
2626
static public function columns() {
27-
if( isset( $_SERVER['OS'] ) && strpos( $_SERVER['OS'], 'indows' ) !== false )
28-
return exec('/usr/bin/env tput cols');
29-
else
30-
return 80; // default width of cmd window on Windows OS, maybe force using MODE CON COLS=XXX?
27+
if ( file_exists('/usr/bin/env') ) {
28+
return exec('/usr/bin/env tput cols');
29+
}
30+
return 80; // default width of cmd window on Windows OS, maybe force using MODE CON COLS=XXX?
3131
}
3232

3333
/**

0 commit comments

Comments
 (0)