Skip to content

Commit 18036fe

Browse files
committed
Refactor isTtySupported()
1 parent a6506e9 commit 18036fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ public static function isTtySupported(): bool
12051205
static $isTtySupported;
12061206

12071207
if (null === $isTtySupported) {
1208-
$isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
1208+
$isTtySupported = ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT));
12091209
}
12101210

12111211
return $isTtySupported;

0 commit comments

Comments
 (0)