From 02646640aa706e28027c8fd3038f712b6cc47c39 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jul 2020 21:51:47 +1000 Subject: [PATCH] update self updater --- app/Http/Controllers/SelfUpdateController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index 968db83dcfaf..bfa265cdd261 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -15,6 +15,7 @@ use App\Utils\Ninja; use Composer\Factory; use Composer\IO\NullIO; use Composer\Installer; +use Cz\Git\GitException; use Cz\Git\GitRepository; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Facades\Artisan; @@ -73,8 +74,12 @@ class SelfUpdateController extends BaseController info("Are there changes to pull? " . $repo->hasChanges()); + try{ $res = $repo->pull(); - + } + catch(GitException $e) { + info($e->getMessage()); + } info("Are there any changes to pull? " . $repo->hasChanges()); Artisan::call('ninja:post-update');