Report errors when a git repo can not be synced up
parent
fded3d8bdd
commit
b0b3e17a37
|
@ -40,7 +40,9 @@ class GitDriver extends VcsDriver
|
||||||
|
|
||||||
// update the repo if it is a valid git repository
|
// update the repo if it is a valid git repository
|
||||||
if (is_dir($this->repoDir) && 0 === $this->process->execute('git remote', $output, $this->repoDir)) {
|
if (is_dir($this->repoDir) && 0 === $this->process->execute('git remote', $output, $this->repoDir)) {
|
||||||
$this->process->execute('git remote update --prune origin', $output, $this->repoDir);
|
if (0 !== $this->process->execute('git remote update --prune origin', $output, $this->repoDir)) {
|
||||||
|
throw new \RuntimeException('Failed to update '.$this->url.', could not read packages from it' . "\n\n" .$this->process->getErrorOutput());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// clean up directory and do a fresh clone into it
|
// clean up directory and do a fresh clone into it
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
|
|
Loading…
Reference in New Issue