function FossilDownloader::doUpdate
@inheritDoc
Overrides VcsDownloader::doUpdate
File
-
vendor/
composer/ composer/ src/ Composer/ Downloader/ FossilDownloader.php, line 57
Class
- FossilDownloader
- @author BohwaZ <http://bohwaz.net/>
Namespace
Composer\DownloaderCode
protected function doUpdate(PackageInterface $initial, PackageInterface $target, string $path, string $url) : PromiseInterface {
// Ensure we are allowed to use this URL by config
$this->config
->prohibitUrlByConfig($url, $this->io);
$this->io
->writeError(" Updating to " . $target->getSourceReference());
if (!$this->hasMetadataRepository($path)) {
throw new \RuntimeException('The .fslckout file is missing from ' . $path . ', see https://getcomposer.org/commit-deps for more information');
}
$realPath = Platform::realpath($path);
$this->execute([
'fossil',
'pull',
], $realPath);
$this->execute([
'fossil',
'up',
(string) $target->getSourceReference(),
], $realPath);
return \React\Promise\resolve(null);
}