#!/usr/bin/env php $paramValue) { $_SERVER[$paramName] = $paramValue; } } else { echo 'Test parameters are required'; exit(1); } try { require $_SERVER['MAGE_DIRS']['base']['path'] . '/app/bootstrap.php'; } catch (\Exception $e) { echo 'Autoload error: ' . $e->getMessage(); exit(1); } try { $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); $application = new Magento\Framework\Console\Cli('Magento CLI'); $application->run(); } catch (\Exception $e) { while ($e) { echo $e->getMessage(); echo $e->getTraceAsString(); echo "\n\n"; $e = $e->getPrevious(); } exit(Cli::RETURN_FAILURE); }