mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Fix push url hack
This commit is contained in:
parent
b5d235abb6
commit
269537e466
2 changed files with 3 additions and 3 deletions
|
@ -119,8 +119,8 @@ class GitDownloader extends VcsDownloader
|
|||
// set push url for github projects
|
||||
if (preg_match('{^(?:https?|git)://github.com/([^/]+)/([^/]+?)(?:\.git)?$}', $package->getSourceUrl(), $match)) {
|
||||
$pushUrl = 'git@github.com:'.$match[1].'/'.$match[2].'.git';
|
||||
$cmd = sprintf('git remote set-url --push origin %s', escapeshellarg($pushUrl));
|
||||
$this->process->execute($cmd, $ignoredOutput, $path);
|
||||
$cmd = sprintf('cd %s && git remote set-url --push origin %s', escapeshellarg($path), escapeshellarg($pushUrl));
|
||||
$this->process->execute($cmd, $ignoredOutput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue