Skip to content

Commit 63504fc

Browse files
Allow output verbosity below normal
Since the cli verbosity is 'normal' most of the time using max was not working if you want to use 'quiet' in your configuration file. Now cli verbosity is ignored as long as it is normal. If it is set manually, it overwrites the configuration file value. So it is cli > config (but ignore normal) Fixes #276
1 parent 7f49012 commit 63504fc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Console/Command/ConfigAware.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,11 @@ private function fetchConfigSettings(InputInterface $input, array $settingNames)
119119
*/
120120
protected function determineVerbosity(OutputInterface $out, Config $config): void
121121
{
122-
$confVerbosity = IOUtil::mapConfigVerbosity($config->getVerbosity());
122+
$verbosity = IOUtil::mapConfigVerbosity($config->getVerbosity());
123123
$cliVerbosity = $out->getVerbosity();
124-
$out->setVerbosity(max($confVerbosity, $cliVerbosity));
124+
if ($cliVerbosity !== OutputInterface::VERBOSITY_NORMAL) {
125+
$verbosity = $cliVerbosity;
126+
}
127+
$out->setVerbosity($verbosity);
125128
}
126129
}

0 commit comments

Comments
 (0)