Explorar o código

Force the origin remote url to be the original one and not that of a mirror

Jordi Boggiano %!s(int64=10) %!d(string=hai) anos
pai
achega
fb1747624c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/Composer/Downloader/GitDownloader.php

+ 4 - 0
src/Composer/Downloader/GitDownloader.php

@@ -60,6 +60,10 @@ class GitDownloader extends VcsDownloader
             }
             $package->setSourceReference($newRef);
         }
+
+        if ($url !== $package->getSourceUrl()) {
+            $this->process->execute(sprintf('git remote set-url origin %s', $package->getSourceUrl()), $output, $path);
+        }
     }
 
     /**