Explorar o código

Fix handling of git repos with no tag, fixes #146

Jordi Boggiano %!s(int64=13) %!d(string=hai) anos
pai
achega
139de0f79d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Repository/Vcs/GitDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/GitDriver.php

@@ -117,7 +117,7 @@ class GitDriver implements VcsDriverInterface
     {
         if (null === $this->tags) {
             exec(sprintf('cd %s && git tag', escapeshellarg($this->tmpDir)), $output);
-            $this->tags = array_combine($output, $output);
+            $this->tags = $output ? array_combine($output, $output) : array();
         }
 
         return $this->tags;