Skip to content

Commit

Permalink
[debug:chain] Add warning message when no chain files found. (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Feb 12, 2018
1 parent 6862cba commit 97b9a31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Command/Debug/ChainCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$files = $this->chainDiscovery->getFiles();
$filesPerDirectory = $this->chainDiscovery->getFilesPerDirectory();

if (!$files || !$filesPerDirectory) {
$this->getIo()->warning($this->trans('commands.debug.chain.messages.no-files'));

return 0;
}

foreach ($filesPerDirectory as $directory => $fileNames) {
$this->getIo()->info(' ' . $this->trans('commands.debug.chain.messages.directory'), false);
$this->getIo()->comment($directory);
Expand Down

0 comments on commit 97b9a31

Please sign in to comment.