Skip to content

Commit c728377

Browse files
[BUGFIX] Consider output of stderr in successful cases
Git writes the output of some commands into `stderr` instead of `stdout` (e.g. `push`). Using the option `--porcelain` doesn't always help in such cases as other information may be missing. To get the full output, `stderr` is now fetched in case `stdout` is empty. Fixes: gitonomy#205
1 parent e4e06bb commit c728377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Gitonomy/Git/Repository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ public function run($command, $args = [])
543543

544544
$process->run();
545545

546-
$output = $process->getOutput();
546+
$output = $process->getOutput() ?: $process->getErrorOutput();
547547

548548
if ($this->logger && $this->debug) {
549549
$duration = microtime(true) - $before;

0 commit comments

Comments
 (0)