Merge remote-tracking branch 'Nami-Doc/patch-1'
commit
720b00b561
|
@ -93,7 +93,14 @@ class GitDownloader extends VcsDownloader
|
||||||
$this->filesystem->removeDirectory($path);
|
$this->filesystem->removeDirectory($path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new \RuntimeException('Failed to checkout ' . $url .' via git, https and http protocols, aborting.' . "\n\n" . $this->process->getErrorOutput());
|
|
||||||
|
// failed to checkout, first check git accessibility
|
||||||
|
$output = $this->process->getErrorOutput();
|
||||||
|
if (127 === $this->process->execute('git --version', $handler)) {
|
||||||
|
throw new \RuntimeException('Failed to checkout ' . $url . ' via git, it isn\'t accessible through the console, please check your installation and your PATH env.' . "\n\n" . $this->process->getErrorOutput());
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \RuntimeException('Failed to checkout ' . $url .' via git, https and http protocols, aborting.' . "\n\n" . $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
$command = call_user_func($commandCallable, $url);
|
$command = call_user_func($commandCallable, $url);
|
||||||
|
|
|
@ -53,7 +53,13 @@ class GitDriver extends VcsDriver
|
||||||
|
|
||||||
$command = sprintf('git clone --mirror %s %s', escapeshellarg($this->url), escapeshellarg($this->repoDir));
|
$command = sprintf('git clone --mirror %s %s', escapeshellarg($this->url), escapeshellarg($this->repoDir));
|
||||||
if (0 !== $this->process->execute($command, $output)) {
|
if (0 !== $this->process->execute($command, $output)) {
|
||||||
throw new \RuntimeException('Failed to clone '.$this->url.', could not read packages from it ('.$this->process->getErrorOutput().')');
|
$output = $this->process->getErrorOutput();
|
||||||
|
|
||||||
|
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…
Reference in New Issue