diff --git a/src/GitTrait.php b/src/GitTrait.php index d5c3779..82ef6f3 100644 --- a/src/GitTrait.php +++ b/src/GitTrait.php @@ -343,11 +343,13 @@ protected function gitCommandRun( ): string { $command = '--no-pager '. $command; try { - return $this->gitWrapper->git($command, $location); + $result = $this->gitWrapper->git($command, $location); + + return $result; } catch (\Exception $exception) { -// if ($errorMessage !== '') { -// throw new \Exception($errorMessage); -// } + if ($errorMessage !== '') { + throw new \Exception($errorMessage); + } throw $exception; } }