Skip to content

Commit

Permalink
Check existence of stub files
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 14, 2020
1 parent e2fe1ef commit 19b36a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Command/CommandHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ public static function begin(
throw new \PHPStan\Command\InceptionNotSuccessfulException();
}

foreach ($container->getParameter('stubFiles') as $stubFile) {
if (is_file($stubFile)) {
continue;
}

$errorOutput->writeLineFormatted(sprintf('Stub file %s does not exist.', $stubFile));

throw new \PHPStan\Command\InceptionNotSuccessfulException();
}

/** @var FileFinder $fileFinder */
$fileFinder = $container->getByType(FileFinder::class);

Expand Down

0 comments on commit 19b36a0

Please sign in to comment.