function FossilDownloader::doInstall
@inheritDoc
Overrides VcsDownloader::doInstall
File
-
vendor/
composer/ composer/ src/ Composer/ Downloader/ FossilDownloader.php, line 38
Class
- FossilDownloader
- @author BohwaZ <http://bohwaz.net/>
Namespace
Composer\DownloaderCode
protected function doInstall(PackageInterface $package, string $path, string $url) : PromiseInterface {
// Ensure we are allowed to use this URL by config
$this->config
->prohibitUrlByConfig($url, $this->io);
$repoFile = $path . '.fossil';
$realPath = Platform::realpath($path);
$this->io
->writeError("Cloning " . $package->getSourceReference());
$this->execute([
'fossil',
'clone',
'--',
$url,
$repoFile,
]);
$this->execute([
'fossil',
'open',
'--nested',
'--',
$repoFile,
], $realPath);
$this->execute([
'fossil',
'update',
'--',
(string) $package->getSourceReference(),
], $realPath);
return \React\Promise\resolve(null);
}