/** * Install application * * @param \Magento\Install\Model\Installer\Console $installer * @return void */ protected function _handleInstall(\Magento\Install\Model\Installer\Console $installer) { if (isset($this->_arguments['config']) && $this->rootDirectory->isExist($this->rootDirectory->getRelativePath($this->_arguments['config']))) { $config = (array) (include $this->_arguments['config']); $this->_arguments = array_merge((array) $config, $this->_arguments); } $result = $installer->install($this->_arguments); if (!$installer->hasErrors()) { $msg = 'Installed successfully' . ($result ? ' (encryption key "' . $result . '")' : ''); $this->_output->success($msg . PHP_EOL); } else { $this->_output->error(implode(PHP_EOL, $installer->getErrors()) . PHP_EOL); } }