Эх сурвалжийг харах

More descriptive exceptions wording

Konstantin Tjuterev 13 жил өмнө
parent
commit
e072607e90

+ 1 - 1
src/Composer/Compiler.php

@@ -37,7 +37,7 @@ class Compiler
 
         $process = new Process('git log --pretty="%h" -n1 HEAD');
         if ($process->run() != 0) {
-            throw new \RuntimeException('The git binary cannot be found.');
+            throw new \RuntimeException('The git binary cannot be found or compile was run not inside git repository folder.');
         }
         $this->version = trim($process->getOutput());
 

+ 1 - 1
src/Composer/Downloader/GitDownloader.php

@@ -60,7 +60,7 @@ class GitDownloader extends VcsDownloader
         }
 
         if (trim($output)) {
-            throw new \RuntimeException('Source directory has uncommitted changes');
+            throw new \RuntimeException('Source directory ' . $path . ' has uncommitted changes');
         }
     }
 }