mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Fix #5960 - catch exception when baseline cannot be located
This commit is contained in:
parent
0a57c86549
commit
f73f2299db
@ -618,10 +618,14 @@ final class Psalm
|
||||
): array {
|
||||
fwrite(STDERR, 'Writing error baseline to file...' . PHP_EOL);
|
||||
|
||||
$issue_baseline = ErrorBaseline::read(
|
||||
new \Psalm\Internal\Provider\FileProvider,
|
||||
$options['set-baseline']
|
||||
);
|
||||
try {
|
||||
$issue_baseline = ErrorBaseline::read(
|
||||
new \Psalm\Internal\Provider\FileProvider,
|
||||
$options['set-baseline']
|
||||
);
|
||||
} catch (\Psalm\Exception\ConfigException $e) {
|
||||
$issue_baseline = [];
|
||||
}
|
||||
|
||||
ErrorBaseline::create(
|
||||
new \Psalm\Internal\Provider\FileProvider,
|
||||
|
Loading…
Reference in New Issue
Block a user