Factory uses "prefered-install" configuration when creating
DownloadManagerpull/2153/head
parent
029341e114
commit
8e8e9d3719
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue