File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,11 @@ static public function isPiped() {
9191 if ($ shellPipe !== false ) {
9292 return filter_var ($ shellPipe , FILTER_VALIDATE_BOOLEAN );
9393 } else {
94- return (function_exists ('posix_isatty ' ) && !posix_isatty (STDOUT ));
94+ if ( function_exists ('stream_isatty ' ) ) {
95+ return !stream_isatty (STDOUT );
96+ } else {
97+ return (function_exists ('posix_isatty ' ) && !posix_isatty (STDOUT ));
98+ }
9599 }
96100 }
97101
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ static function _call( $func, $args ) {
1414 }
1515
1616 static public function isTty () {
17- return (function_exists ('posix_isatty ' ) && posix_isatty (static ::$ out ));
17+ if ( function_exists ('stream_isatty ' ) ) {
18+ return !stream_isatty (static ::$ out );
19+ } else {
20+ return (function_exists ('posix_isatty ' ) && !posix_isatty (static ::$ out ));
21+ }
1822 }
1923
2024 /**
You can’t perform that action at this time.
0 commit comments