Catch runtime exception while initializing Composer to make sure a missing composer.json does not fail >tryComposer, refs #11133
parent
e5b8f2d838
commit
803e4e5dbd
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue