8000 fix xterm detection · symfony/symfony@1b59cb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b59cb0

Browse files
committed
fix xterm detection
1 parent 8d06a8a commit 1b59cb0

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) {
@@ -107,7 +104,7 @@ protected function hasColorSupport()
107104
&& @sapi_windows_vt100_support($this->stream))
108105
|| false !== getenv('ANSICON')
109106
|| 'ON' === getenv('ConEmuANSI')
110-
|| 'xterm' === getenv('TERM');
107+
|| str_starts_with((string) getenv('TERM'), 'xterm');
111108
}
112109

113110
return stream_isatty($this->stream);

0 commit comments

Comments
 (0)
0