File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,8 @@ private static function hasColorSupport()
231
231
&& sapi_windows_vt100_support (STDOUT ))
232
232
|| false !== getenv ('ANSICON ' )
233
233
|| 'ON ' === getenv ('ConEmuANSI ' )
234
- || 'xterm ' === getenv ('TERM ' );
234
+ || 'xterm ' === getenv ('TERM ' )
235
+ || 'Hyper ' === getenv ('TERM_PROGRAM ' );
235
236
}
236
237
237
238
if (function_exists ('stream_isatty ' )) {
Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ protected function hasColorSupport()
98
98
&& @sapi_windows_vt100_support ($ this ->stream ))
99
99
|| false !== getenv ('ANSICON ' )
100
100
|| 'ON ' === getenv ('ConEmuANSI ' )
101
- || 'xterm ' === getenv ('TERM ' );
101
+ || 'xterm ' === getenv ('TERM ' )
102
+ || 'Hyper ' === getenv ('TERM_PROGRAM ' );
102
103
}
103
104
104
105
if (function_exists ('stream_isatty ' )) {
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ public function createProgressBar($max = 0)
271
271
{
272
272
$ progressBar = parent ::createProgressBar ($ max );
273
273
274
- if ('\\' !== DIRECTORY_SEPARATOR ) {
274
+ if ('\\' !== DIRECTORY_SEPARATOR || ' Hyper ' === getenv ( ' TERM_PROGRAM ' ) ) {
275
275
$ progressBar ->setEmptyBarCharacter ('░ ' ); // light shade character \u2591
276
276
$ progressBar ->setProgressCharacter ('' );
277
277
$ progressBar ->setBarCharacter ('▓ ' ); // dark shade character \u2593
Original file line number Diff line number Diff line change @@ -484,7 +484,8 @@ private function hasColorSupport($stream)
484
484
&& @sapi_windows_vt100_support ($ stream ))
485
485
|| false !== getenv ('ANSICON ' )
486
486
|| 'ON ' === getenv ('ConEmuANSI ' )
487
- || 'xterm ' === getenv ('TERM ' );
487
+ || 'xterm ' === getenv ('TERM ' )
488
+ || 'Hyper ' === getenv ('TERM_PROGRAM ' );
488
489
}
489
490
490
491
if (function_exists ('stream_isatty ' )) {
@@ -513,7 +514,8 @@ private function isWindowsTrueColor()
513
514
{
514
515
$ result = 183 <= getenv ('ANSICON_VER ' )
515
516
|| 'ON ' === getenv ('ConEmuANSI ' )
516
- || 'xterm ' === getenv ('TERM ' );
517
+ || 'xterm ' === getenv ('TERM ' )
518
+ || 'Hyper ' === getenv ('TERM_PROGRAM ' );
517
519
518
520
if (!$ result && PHP_VERSION_ID >= 70200 ) {
519
521
$ version = sprintf (
You can’t perform that action at this time.
0 commit comments