From e07d2a7beff07144ee0ff314270a1842c4c5b9ec Mon Sep 17 00:00:00 2001 From: GeoSot Date: Thu, 22 Jul 2021 16:14:15 +0300 Subject: [PATCH] Respect parent setting, handling exceptions (#10017) --- src/Composer/Console/Application.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index a87f40f8c..48d617307 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -419,7 +419,10 @@ class Application extends BaseApplication } catch (\InvalidArgumentException $e) { if ($required) { $this->io->writeError($e->getMessage()); - exit(1); + if ($this->areExceptionsCaught()){ + exit(1); + } + throw $e; } } catch (JsonValidationException $e) { if ($required) {