From c8612a0fd2fe076d6296d87f24de6c122109b52d Mon Sep 17 00:00:00 2001 From: Conkley Date: Mon, 25 Jul 2022 16:24:28 +1000 Subject: [PATCH] git pull fix (hopefully) --- app/Console/Commands/RefreshApp.php | 9 +++++++-- composer.json | 1 + composer.lock | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/RefreshApp.php b/app/Console/Commands/RefreshApp.php index 930d6a1..18e530d 100644 --- a/app/Console/Commands/RefreshApp.php +++ b/app/Console/Commands/RefreshApp.php @@ -109,10 +109,15 @@ class RefreshApp extends Command private function runPull() { - - $process = new Process(['git pull']); + chdir("/var/www/MORBLOX-WEBSITE/morblox-site"); + $exception = new Process(['/usr/bin/git', 'config', '--global', '--add', 'safe.directory', '/var/www/MORBLOX-WEBSITE/morblox-site']); + $process = new Process(['/usr/bin/git', 'pull']); $this->info("Running 'git pull'"); + $exception->run(function($type, $buffer) { + $this->pullLog[] = $buffer; + }); + $process->run(function($type, $buffer) { $this->pullLog[] = $buffer; diff --git a/composer.json b/composer.json index dbda356..28084f3 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "laravel/tinker": "^2.5", "laravel/ui": "^3.4", "multicaret/laravel-acquaintances": "^3.5", + "symfony/process": "^5.4", "webpatser/laravel-uuid": "^4.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 08f6aea..9d64f7a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5b427c2301ce3db3e2dbf83c41ddf6ed", + "content-hash": "e197d3176b112e2dd2d96af84c934b22", "packages": [ { "name": "asm89/stack-cors",