1
0
Fork 0

Add BC for the composer remote

pull/658/head
Jordi Boggiano 2012-04-18 16:05:23 +02:00
parent ef300ca56a
commit e364494286
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ class GitDownloader extends VcsDownloader
$this->io->write(" Checking out ".$target->getSourceReference()); $this->io->write(" Checking out ".$target->getSourceReference());
$command = 'cd %s && git remote set-url composer %s && git fetch composer && git fetch --tags composer && git checkout %3$s && git reset --hard %3$s'; $command = 'cd %s && git remote set-url composer %s && git fetch composer && git fetch --tags composer && git checkout %3$s && git reset --hard %3$s';
// TODO: BC for the composer remote that didn't exist, to be remove after May 18th.
$this->process->execute(sprintf('cd %s && git remote add composer %s', escapeshellarg($path), escapeshellarg($initial->getSourceUrl())), $ignoredOutput);
$commandCallable = function($url) use ($ref, $path, $command) { $commandCallable = function($url) use ($ref, $path, $command) {
return sprintf($command, escapeshellarg($path), escapeshellarg($url), escapeshellarg($ref)); return sprintf($command, escapeshellarg($path), escapeshellarg($url), escapeshellarg($ref));
}; };