From 15343c1afd82586acc739b4f81725fc082242239 Mon Sep 17 00:00:00 2001 From: "tan.nguyen" Date: Tue, 5 Mar 2024 22:26:25 +0700 Subject: [PATCH] test --- src/GitTrait.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } }