Skip to content

Commit

Permalink
CliRenderer: Hide stderr in tput check
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Aug 21, 2024
1 parent 6eeb503 commit 5c3f626
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified build/kint.phar
Binary file not shown.
8 changes: 6 additions & 2 deletions src/Renderer/CliRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ public function __construct()
if (null === self::$terminal_width) {
if (!KINT_WIN && self::$detect_width) {
try {
$tput = \exec('tput cols');
if (false !== $tput) {
$tput = \exec('tput cols 2>/dev/null');
if ((bool) $tput) {
/**
* @psalm-suppress InvalidCast
* Psalm bug #11080
*/
self::$terminal_width = (int) $tput;
}
} catch (Throwable $t) {
Expand Down

0 comments on commit 5c3f626

Please sign in to comment.