Skip to content

Commit

Permalink
Merge pull request #334 from jolicode/qa-dx
Browse files Browse the repository at this point in the history
Better DX when tools are not installed
  • Loading branch information
pyrech authored Nov 12, 2024
2 parents cf7ac22 + 2f66569 commit c9efbc5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .castor/qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ function update(): void
function phpstan(): int
{
if (!is_dir(variable('root_dir') . '/tools/phpstan/vendor')) {
io()->error('PHPStan is not installed. Run `castor qa:install` first.');

return 1;
install();
}

return docker_exit_code('phpstan', workDir: '/var/www');
Expand All @@ -60,9 +58,7 @@ function phpstan(): int
function cs(bool $dryRun = false): int
{
if (!is_dir(variable('root_dir') . '/tools/php-cs-fixer/vendor')) {
io()->error('PHP-CS-Fixer is not installed. Run `castor qa:install` first.');

return 1;
install();
}

if ($dryRun) {
Expand Down

0 comments on commit c9efbc5

Please sign in to comment.