1
0
Fork 0

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

pull/9735/head
Jordi Boggiano 2021-02-24 15:46:54 +01:00
parent c201dc3582
commit e3af4ee606
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 3 deletions

View File

@ -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);