From c498f230d41719fa6eb3f3c8e4bd0c243b0b0398 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 17 Dec 2020 07:12:20 +1100 Subject: [PATCH] Adjustments for post update --- app/Console/Commands/PostUpdate.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/PostUpdate.php b/app/Console/Commands/PostUpdate.php index 95b525397b..011c224bc0 100644 --- a/app/Console/Commands/PostUpdate.php +++ b/app/Console/Commands/PostUpdate.php @@ -55,16 +55,21 @@ class PostUpdate extends Command info("finished migrating"); - putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer'); + 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)); + } - $input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']); - $application = new Application(); - $application->setAutoExit(false); - $output = new BufferedOutput(); - $application->run($input, $output); - info("finished running composer install "); - + info(print_r($output->fetch(), 1)); try {