Skip to content

Commit ad0fadb

Browse files
committed
auto-disable progress indicator when not running in a terminal
1 parent 7761f14 commit ad0fadb

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": ">= 8.0",
15-
"nette/command-line": "^2.0",
15+
"nette/command-line": "^1.9.2",
1616
"nette/utils": "^4.0",
1717
"nette/neon": "^3.0",
1818
"latte/latte": "^3.0.7",

src/bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Nette\CodeChecker;
1010

11+
use Nette\CommandLine\Console;
1112
use Nette\CommandLine\Parser;
1213

1314
$autoload = is_file(__DIR__ . '/../vendor/autoload.php')
@@ -85,7 +86,7 @@
8586
}
8687

8788
$checker->readOnly = !isset($options['--fix']);
88-
$checker->showProgress = !isset($options['--no-progress']);
89+
$checker->showProgress = !isset($options['--no-progress']) && Console::detectTerminal();
8990

9091
if (isset($options['--only-syntax'])) {
9192
$checker->addTask([$tasks, 'phpSyntaxChecker'], '*.php,*.phpt');

0 commit comments

Comments
 (0)