diff --git a/Repository/AssetVcsRepository.php b/Repository/AssetVcsRepository.php index 5ff15a2d..4f8c39f8 100644 --- a/Repository/AssetVcsRepository.php +++ b/Repository/AssetVcsRepository.php @@ -15,6 +15,7 @@ use Composer\Package\BasePackage; use Composer\Package\CompletePackageInterface; use Composer\Package\Loader\ArrayLoader; +use Composer\Package\Loader\InvalidPackageException; use Composer\Package\PackageInterface; use Composer\Repository\InvalidRepositoryException; use Composer\Repository\Vcs\VcsDriverInterface; @@ -31,6 +32,8 @@ class AssetVcsRepository extends AbstractAssetVcsRepository { /** * {@inheritdoc} + * + * @throws */ protected function initialize() { @@ -47,6 +50,8 @@ protected function initialize() /** * Init the driver with branches and tags. + * + * @throws */ protected function initFullDriver() { @@ -57,6 +62,11 @@ protected function initFullDriver() $this->initBranches($driver); $driver->cleanup(); } catch (\Exception $e) { + if (!$e instanceof \InvalidArgumentException + && !$e instanceof InvalidPackageException && !$e instanceof InvalidRepositoryException) { + throw $e; + } + // do nothing } }