Skip to content

Commit 109c088

Browse files
committed
fix xterm detection
1 parent 4496b59 commit 109c088

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Symfony/Component/Console/Output/StreamOutput.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ public function getStream()
6464
return $this->stream;
6565
}
6666

67-
/**
68-
* {@inheritdoc}
69-
*/
7067
protected function doWrite(string $message, bool $newline)
7168
{
7269
if ($newline) {
@@ -103,7 +100,7 @@ protected function hasColorSupport()
103100
&& @sapi_windows_vt100_support($this->stream))
104101
|| false !== getenv('ANSICON')
105102
|| 'ON' === getenv('ConEmuANSI')
106-
|| 'xterm' === getenv('TERM');
103+
|| str_starts_with((string) getenv('TERM'), 'xterm');
107104
}
108105

109106
return 'Hyper' === getenv('TERM_PROGRAM')

0 commit comments

Comments
 (0)