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

Breadcrumb

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

function Git::throwException

Parameters

non-empty-string $message:

Return value

never

1 call to Git::throwException()
Git::runCommand in vendor/composer/composer/src/Composer/Util/Git.php

File

vendor/composer/composer/src/Composer/Util/Git.php, line 578

Class

Git
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Util

Code

private function throwException($message, string $url) : void {
    // git might delete a directory when it fails and php will not know
    clearstatcache();
    if (0 !== $this->process
        ->execute([
        'git',
        '--version',
    ], $ignoredOutput)) {
        throw new \RuntimeException(Url::sanitize('Failed to clone ' . $url . ', git was not found, check that it is installed and in your PATH env.' . "\n\n" . $this->process
            ->getErrorOutput()));
    }
    throw new \RuntimeException(Url::sanitize($message));
}

API Navigation

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