diff --git a/lib/Command/Announce.php b/lib/Command/Announce.php index e9dd121d..6a4a098a 100644 --- a/lib/Command/Announce.php +++ b/lib/Command/Announce.php @@ -143,7 +143,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int // validation if ($scheduleTime && $deleteTime && $deleteTime < $scheduleTime) { - throw new \InvalidArgumentException("Publishing time is after deletion time"); + $output->writeln('Publishing time is after deletion time'); + return 2; } $plainMessage = $this->plainifyMessage($message);