Skip to content

Commit 80bb837

Browse files
authored
Update Streams.php
The function isTty() in Streams.php returns wrong information. If the output is to an TTY then it returns false and if the output is a pipe or file it returns true, it should be the other way around.
1 parent a286685 commit 80bb837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cli/Streams.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ static function _call( $func, $args ) {
1515

1616
static public function isTty() {
1717
if ( function_exists('stream_isatty') ) {
18-
return !stream_isatty(static::$out);
18+
return stream_isatty(static::$out);
1919
} else {
20-
return (function_exists('posix_isatty') && !posix_isatty(static::$out));
20+
return (function_exists('posix_isatty') && posix_isatty(static::$out));
2121
}
2222
}
2323

0 commit comments

Comments
 (0)