Skip to content

Commit

Permalink
Fix private property access, fixes #10022
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jul 28, 2021
1 parent 2fb5323 commit 2665f1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Composer/Console/Application.php
Expand Up @@ -419,7 +419,8 @@ public function getComposer($required = true, $disablePlugins = null)
} catch (\InvalidArgumentException $e) {
if ($required) {
$this->io->writeError($e->getMessage());
if ($this->catchExceptions) {
// TODO composer 2.3 simplify to $this->areExceptionsCaught()
if (!method_exists($this, 'areExceptionsCaught') || $this->areExceptionsCaught()) {
exit(1);
}
throw $e;
Expand Down

0 comments on commit 2665f1b

Please sign in to comment.