Include stdout as well as stderr if git stash/diff/.. fails, fixes #9720

main
Jordi Boggiano 3 years ago
parent c201dc3582
commit e3af4ee606
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -519,7 +519,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
{
$path = $this->normalizePath($path);
if (0 !== $this->process->execute('git clean -df && git reset --hard', $output, $path)) {
throw new \RuntimeException("Could not reset changes\n\n:".$this->process->getErrorOutput());
throw new \RuntimeException("Could not reset changes\n\n:".$output);
}
$this->hasDiscardedChanges[$path] = true;
@ -533,7 +533,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
{
$path = $this->normalizePath($path);
if (0 !== $this->process->execute('git stash --include-untracked', $output, $path)) {
throw new \RuntimeException("Could not stash changes\n\n:".$this->process->getErrorOutput());
throw new \RuntimeException("Could not stash changes\n\n:".$output);
}
$this->hasStashedChanges[$path] = true;
@ -547,7 +547,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
{
$path = $this->normalizePath($path);
if (0 !== $this->process->execute('git diff HEAD', $output, $path)) {
throw new \RuntimeException("Could not view diff\n\n:".$this->process->getErrorOutput());
throw new \RuntimeException("Could not view diff\n\n:".$output);
}
$this->io->writeError($output);

Loading…
Cancel
Save