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

Breadcrumb

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

function XzDownloader::extract

Overrides ArchiveDownloader::extract

File

vendor/composer/composer/src/Composer/Downloader/XzDownloader.php, line 27

Class

XzDownloader
Xz archive downloader.

Namespace

Composer\Downloader

Code

protected function extract(PackageInterface $package, string $file, string $path) : PromiseInterface {
    $command = [
        'tar',
        '-xJf',
        $file,
        '-C',
        $path,
    ];
    if (0 === $this->process
        ->execute($command, $ignoredOutput)) {
        return \React\Promise\resolve(null);
    }
    $processError = 'Failed to execute ' . implode(' ', $command) . "\n\n" . $this->process
        ->getErrorOutput();
    throw new \RuntimeException($processError);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal