Pārlūkot izejas kodu

better exception message

Mateusz Heleniak 12 gadi atpakaļ
vecāks
revīzija
be736c745e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/Composer/Installer.php

+ 1 - 1
src/Composer/Installer.php

@@ -391,7 +391,7 @@ class Installer
                 $sourceReference = $package->getSourceReference() ?: $package->getDistReference();
                 if (isset($lockedReference) && $lockedReference !== $sourceReference) {
                     if (!$package->getSourceType() && $package->getDistType()) {
-                        throw new \RuntimeException(sprintf('Dist reference (%s) does not match locked reference (%s)', $sourceReference, $lockedReference));
+                        throw new \RuntimeException(sprintf('Cannot install "%s" - dist reference ("%s") does not match locked reference ("%s")', $package->getName(), $sourceReference, $lockedReference));
                     }
 
                     // changing the source ref to update to will be handled in the operations loop below