Skip to content

Commit

Permalink
Force update of the PHPStan Pro PHAR in case of crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 24, 2022
1 parent d194a47 commit b95606e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Command/FixerApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function log(string $message): void
}

$fixerProcess->start($loop);
$fixerProcess->on('exit', static function ($exitCode) use ($output, $loop): void {
$fixerProcess->on('exit', function ($exitCode) use ($output, $loop): void {
$loop->stop();
if ($exitCode === null) {
return;
Expand All @@ -253,6 +253,7 @@ public function log(string $message): void
return;
}
$output->writeln(sprintf('<fg=red>PHPStan Pro process exited with code %d.</>', $exitCode));
@unlink($this->fixerTmpDir . '/phar-info.json');
});

$loop->run();
Expand Down

0 comments on commit b95606e

Please sign in to comment.