1
0
Fork 0

Clean up var name

pull/2562/head
Jordi Boggiano 2014-01-06 19:20:03 +01:00
parent 7683333515
commit bc153ea78b
1 changed files with 2 additions and 1 deletions

View File

@ -216,7 +216,7 @@ class GitDownloader extends VcsDownloader
$gitRef = $reference;
if (!preg_match('{^[a-f0-9]{40}$}', $reference)
&& $branches
&& preg_match('{^\s+composer/'.preg_quote($reference).'$}m', $output)
&& preg_match('{^\s+composer/'.preg_quote($reference).'$}m', $branches)
) {
$command = sprintf('git checkout -B %s %s && git reset --hard %2$s', escapeshellarg($branch), escapeshellarg('composer/'.$reference));
if (0 === $this->process->execute($command, $output, $path)) {
@ -360,6 +360,7 @@ class GitDownloader extends VcsDownloader
preg_match('{(https?://)([^/]+)(.*)$}i', $url, $match) &&
strpos($this->process->getErrorOutput(), 'fatal: Authentication failed') !== false
) {
// TODO this should use an auth manager class that prompts and stores in the config
if ($this->io->hasAuthentication($match[2])) {
$auth = $this->io->getAuthentication($match[2]);
} else {