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() {
91
91
if ($ shellPipe !== false ) {
92
92
return filter_var ($ shellPipe , FILTER_VALIDATE_BOOLEAN );
93
93
} 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
+ }
95
99
}
96
100
}
97
101
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ static function _call( $func, $args ) {
14
14
}
15
15
16
16
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
+ }
18
22
}
19
23
20
24
/**
You can’t perform that action at this time.
0 commit comments