Skip to content

Commit

Permalink
Respect parent setting, handling exceptions (#10017)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Jul 22, 2021
1 parent a5ee226 commit e07d2a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Composer/Console/Application.php
Expand Up @@ -419,7 +419,10 @@ public function getComposer($required = true, $disablePlugins = null)
} catch (\InvalidArgumentException $e) {
if ($required) {
$this->io->writeError($e->getMessage());
exit(1);
if ($this->areExceptionsCaught()){
exit(1);
}
throw $e;
}
} catch (JsonValidationException $e) {
if ($required) {
Expand Down

0 comments on commit e07d2a7

Please sign in to comment.