Skip to content

Commit

Permalink
Shortcut for crontab --cron (fixes) (#9)
Browse files Browse the repository at this point in the history
Shortcut for crontab `--cron` (fixes) (#9)
  • Loading branch information
SmetDenis authored Jun 9, 2022
1 parent 34446cb commit b430b00
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit b430b00

Please sign in to comment.