1
0
Fork 0

Minor tweaks to perforce support, refs #2329

pull/2315/merge
Jordi Boggiano 2013-10-16 10:53:57 +02:00
parent a3e304028c
commit ce8b475f4c
2 changed files with 5 additions and 4 deletions

View File

@ -292,6 +292,7 @@ class Factory
$rm->setRepositoryClass('pear', 'Composer\Repository\PearRepository');
$rm->setRepositoryClass('git', 'Composer\Repository\VcsRepository');
$rm->setRepositoryClass('svn', 'Composer\Repository\VcsRepository');
$rm->setRepositoryClass('perforce', 'Composer\Repository\VcsRepository');
$rm->setRepositoryClass('hg', 'Composer\Repository\VcsRepository');
$rm->setRepositoryClass('artifact', 'Composer\Repository\ArtifactRepository');

View File

@ -160,11 +160,11 @@ class PerforceDriver extends VcsDriver
*/
public static function supports(IOInterface $io, $url, $deep = false)
{
if (false === $deep) {
return false;
if ($deep || preg_match('#\b(perforce|p4)\b#i', $url)) {
return Perforce::checkServerExists($url, new ProcessExecutor);
}
return Perforce::checkServerExists($url, new ProcessExecutor);
return false;
}
/**