mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Update src/Composer/Repository/Vcs/GitDriver.php
This commit is contained in:
parent
66efa343a9
commit
1dba604ba1
1 changed files with 5 additions and 4 deletions
|
@ -54,11 +54,12 @@ class GitDriver extends VcsDriver
|
|||
$command = sprintf('git clone --mirror %s %s', escapeshellarg($this->url), escapeshellarg($this->repoDir));
|
||||
if (0 !== $this->process->execute($command, $output)) {
|
||||
$output = $this->process->getErrorOutput();
|
||||
if (false === strpos($this->process->execute('git --version', $handler), 'git version')) {
|
||||
throw new \RuntimeException('Failed to clone '.$this->url.', it looks like git isn\'t accessible through the console, please check your installation and your PATH env.' . "\n\n" . $this->process->getErrorOutput());
|
||||
} else {
|
||||
throw new \RuntimeException('Failed to clone '.$this->url.', could not read packages from it ('.$output.')');
|
||||
|
||||
if (127 === $this->process->execute('git --version', $handler)) {
|
||||
throw new \RuntimeException('Failed to clone '.$this->url.', git isn\'t accessible through the console, please check your installation and your PATH env.' . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
|
||||
throw new \RuntimeException('Failed to clone '.$this->url.', could not read packages from it ('.$output.')');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue