From b430b00974a0c7dacf840c16d6e9431e1459ecae Mon Sep 17 00:00:00 2001 From: Denis Smet Date: Thu, 9 Jun 2022 23:28:49 +0300 Subject: [PATCH] Shortcut for crontab `--cron` (fixes) (#9) Shortcut for crontab `--cron` (fixes) (#9) --- src/Cli.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Cli.php b/src/Cli.php index 2ef2183..73f576b 100644 --- a/src/Cli.php +++ b/src/Cli.php @@ -95,7 +95,10 @@ public function __construct(InputInterface $input, OutputInterface $output) $errOutput = self::addOutputStyles($errOutput); if ($this->isCron()) { - $this->output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + $this->output->setDecorated(false); + if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) { + $this->output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + } } if ($this->isStdoutOnly()) { @@ -385,7 +388,7 @@ public function isDebugLevel(): bool */ public function isProgressBarDisabled(): bool { - return bool($this->getInput()->getOption('no-progress')); + return bool($this->getInput()->getOption('no-progress')) || $this->isCron(); } /**