From f0538844884f4c27960c40bc780b14c02e7e4f94 Mon Sep 17 00:00:00 2001 From: Conkley Date: Mon, 25 Jul 2022 16:50:05 +1000 Subject: [PATCH] git pull stuff --- app/Console/Commands/RefreshApp.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/Console/Commands/RefreshApp.php b/app/Console/Commands/RefreshApp.php index 67180be..a580ee3 100644 --- a/app/Console/Commands/RefreshApp.php +++ b/app/Console/Commands/RefreshApp.php @@ -109,20 +109,10 @@ class RefreshApp extends Command private function runPull() { - chdir("/var/www/MORBLOX-WEBSITE/morblox-site"); - $chown = new Process(['sudo', 'chown', '$(whoami)', '/var/www/']); - $exception = new Process(['/usr/bin/git', 'config', '--global', '--add', 'safe.directory', '/var/www/MORBLOX-WEBSITE/morblox-site']); - $process = new Process(['/usr/bin/git', 'pull']); + $process = Process::fromShellCommandline('git pull'); + $process->setWorkingDirectory(base_path()); $this->info("Running 'git pull'"); - $chown->run(function($type, $buffer) { - $this->pullLog[] = $buffer; - }); - - $exception->run(function($type, $buffer) { - $this->pullLog[] = $buffer; - }); - $process->run(function($type, $buffer) { $this->pullLog[] = $buffer;