diff --git a/app/Console/Commands/PostUpdate.php b/app/Console/Commands/PostUpdate.php index 011c224bc072..113d59a77a9a 100644 --- a/app/Console/Commands/PostUpdate.php +++ b/app/Console/Commands/PostUpdate.php @@ -15,8 +15,6 @@ use App\Jobs\Util\VersionCheck; use Composer\Console\Application; use Illuminate\Console\Command; use Illuminate\Support\Facades\Artisan; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\BufferedOutput; class PostUpdate extends Command { @@ -55,22 +53,10 @@ class PostUpdate extends Command info("finished migrating"); - try { - putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer'); - - $input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']); - $application = new Application(); - $application->setAutoExit(false); - $output = new BufferedOutput(); - $application->run($input, $output); - }catch(\Exception $e) { - info("i wasn't able to compser install"); - info(print_r($e->getMessage(),1)); - } + exec('vendor/bin/composer install --no-dev:'); info("finished running composer install "); - info(print_r($output->fetch(), 1)); try { Artisan::call('optimize'); diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index fbf1366286ba..f1285a538c77 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -75,7 +75,11 @@ class SelfUpdateController extends BaseController } info('Are there any changes to pull? '.$repo->hasChanges()); - Artisan::call('ninja:post-update'); + dispatch(function (){ + + Artisan::call('ninja:post-update'); + + }); return response()->json(['message' => ''], 200); }