Procházet zdrojové kódy

Display the error output in the thrown exception

Elendev před 6 roky
rodič
revize
ea5644281a
1 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 7 1
      src/Composer/Util/Hg.php

+ 7 - 1
src/Composer/Util/Hg.php

@@ -63,9 +63,15 @@ class Hg
             if (0 === $this->process->execute($command)) {
                 return;
             }
+
+            $error = $this->process->getErrorOutput();
+        } else {
+            $error = 'The given URL (' . $url . ') does not match the required format (http(s)://(username:password@)example.com/path-to-repository)';
         }
 
-        $this->throwException('Failed to clone ' . $url . ', aborting', $url);
+
+
+        $this->throwException('Failed to clone ' . $url . ', ' . "\n\n" . $error, $url);
 
     }