From 5730c24c9258e05ca85035ca41170f806c43066e Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 22 Jun 2022 13:30:39 +0200 Subject: [PATCH] Rethrow path repo init failures with path information, closes #10845 --- src/Composer/Repository/PathRepository.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php index 3335f0a79..bd32d3612 100644 --- a/src/Composer/Repository/PathRepository.php +++ b/src/Composer/Repository/PathRepository.php @@ -213,7 +213,11 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn } } - $this->addPackage($this->loader->load($package)); + try { + $this->addPackage($this->loader->load($package)); + } catch (\Exception $e) { + throw new \RuntimeException('Failed loading the package in '.$composerFilePath, 0, $e); + } } }