1
0
Fork 0

Factory uses "prefered-install" configuration when creating

DownloadManager
pull/2153/head
Renan de Lima 2013-07-22 10:42:48 -03:00
parent 029341e114
commit 8e8e9d3719
1 changed files with 13 additions and 0 deletions

View File

@ -316,6 +316,19 @@ class Factory
} }
$dm = new Downloader\DownloadManager(); $dm = new Downloader\DownloadManager();
switch ($config->get('preferred-install')) {
case 'dist':
$dm->setPreferDist(true);
break;
case 'source':
$dm->setPreferSource(true);
break;
case 'auto':
default:
// noop
break;
}
$dm->setDownloader('git', new Downloader\GitDownloader($io, $config)); $dm->setDownloader('git', new Downloader\GitDownloader($io, $config));
$dm->setDownloader('svn', new Downloader\SvnDownloader($io, $config)); $dm->setDownloader('svn', new Downloader\SvnDownloader($io, $config));
$dm->setDownloader('hg', new Downloader\HgDownloader($io, $config)); $dm->setDownloader('hg', new Downloader\HgDownloader($io, $config));