Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4496b59

Browse filesBrowse files
committed
minor #52942 Refactor hyper check location (theofidry)
This PR was merged into the 5.4 branch. Discussion ---------- Refactor hyper check location | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | None | License | MIT Extracted from #52940 to reduce the noise of that PR. There is no logic change, only a potentially a performance (I assume non-existent given it's a if check of a constant). If it is a concern however, this could be checked _before_ the windows specific checks. Commits ------- 9c09e16 refactor: hyper check
2 parents 8d06a8a + 9c09e16 commit 4496b59
Copy full SHA for 4496b59

File tree

1 file changed

+2
-5
lines changed
Filter options

1 file changed

+2
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Output/StreamOutput.php
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ protected function hasColorSupport()
9898
return false;
9999
}
100100

101-
if ('Hyper' === getenv('TERM_PROGRAM')) {
102-
return true;
103-
}
104-
105101
if (\DIRECTORY_SEPARATOR === '\\') {
106102
return (\function_exists('sapi_windows_vt100_support')
107103
&& @sapi_windows_vt100_support($this->stream))
@@ -110,6 +106,7 @@ protected function hasColorSupport()
110106
|| 'xterm' === getenv('TERM');
111107
}
112108

113-
return stream_isatty($this->stream);
109+
return 'Hyper' === getenv('TERM_PROGRAM')
110+
|| stream_isatty($this->stream);
114111
}
115112
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.