Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tannguyen04 committed Mar 5, 2024
1 parent f442408 commit 15343c1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/GitTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 15343c1

Please sign in to comment.