git pull stuff

This commit is contained in:
Conkley 2022-07-25 16:50:05 +10:00
parent 636bffc38d
commit f053884488
1 changed files with 2 additions and 12 deletions

View File

@ -109,20 +109,10 @@ class RefreshApp extends Command
private function runPull() private function runPull()
{ {
chdir("/var/www/MORBLOX-WEBSITE/morblox-site"); $process = Process::fromShellCommandline('git pull');
$chown = new Process(['sudo', 'chown', '$(whoami)', '/var/www/']); $process->setWorkingDirectory(base_path());
$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'"); $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) { $process->run(function($type, $buffer) {
$this->pullLog[] = $buffer; $this->pullLog[] = $buffer;