Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FossilDownloader.php

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/&gt;

Namespace

Composer\Downloader

Code

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);
}
RSS feed
Powered by Drupal