Skip to content

Commit ab5763c

Browse files
committed
tweak: friendlier cli message
1 parent 7461949 commit ab5763c

2 files changed

Lines changed: 42 additions & 33 deletions

File tree

composer.lock

Lines changed: 37 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/RunCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Gt\Cli\Parameter\Parameter;
99
use Gt\Cli\Stream;
1010
use Gt\Cron\CronException;
11+
use Gt\Cron\CrontabNotFoundException;
1112
use Gt\Cron\FunctionExecutionException;
1213
use Gt\Cron\RunnerFactory;
1314
use Gt\Cron\ScriptExecutionException;
@@ -27,6 +28,10 @@ public function run(?ArgumentValueList $arguments = null):void {
2728
$filename
2829
);
2930
}
31+
catch(CrontabNotFoundException) {
32+
$this->stream->writeLine("Skipping cron as there is no crontab file.");
33+
return;
34+
}
3035
catch(CronException $exception) {
3136
$this->stream->writeLine(
3237
$exception->getMessage(),

0 commit comments

Comments
 (0)