1
0
Fork 0

Catch runtime exception while initializing Composer to make sure a missing composer.json does not fail >tryComposer, refs #11133

pull/11150/head
Jordi Boggiano 2022-10-25 15:04:08 +02:00
parent e5b8f2d838
commit 803e4e5dbd
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ use Composer\Util\Filesystem;
use Composer\Util\Platform;
use Composer\Util\Silencer;
use LogicException;
use RuntimeException;
use Seld\Signal\SignalHandler;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Exception\CommandNotFoundException;
@ -512,6 +513,10 @@ class Application extends BaseApplication
if ($required) {
throw $e;
}
} catch (RuntimeException $e) {
if ($required) {
throw $e;
}
}
}