Skip to content

Commit

Permalink
[BUGFIX] Consider output of stderr in successful cases
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andreaskienast committed Jul 11, 2023
1 parent e4e06bb commit c728377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gitonomy/Git/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public function run($command, $args = [])

$process->run();

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

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

0 comments on commit c728377

Please sign in to comment.