N98\Magento\Command\Installer\InstallCommand::runInstallScriptCommand PHP Method

runInstallScriptCommand() private method

Invoke Magento PHP install script shell/install.php
private runInstallScriptCommand ( Symfony\Component\Console\Output\OutputInterface $output, string $installationFolder, array $argv ) : void
$output Symfony\Component\Console\Output\OutputInterface
$installationFolder string folder where magento is installed in, must exists setup script in
$argv array
return void
    private function runInstallScriptCommand(OutputInterface $output, $installationFolder, array $argv)
    {
        $installArgs = '';
        foreach ($argv as $argName => $argValue) {
            $installArgs .= '--' . $argName . ' ' . escapeshellarg($argValue) . ' ';
        }
        $output->writeln('<info>Start installation process.</info>');
        $installCommand = sprintf('%s -ddisplay_startup_errors=1 -ddisplay_errors=1 -derror_reporting=-1 -f %s -- %s', OperatingSystem::getPhpBinary(), escapeshellarg($installationFolder . '/' . self::MAGENTO_INSTALL_SCRIPT_PATH), $installArgs);
        $output->writeln('<comment>' . $installCommand . '</comment>');
        $installException = null;
        $installationOutput = null;
        $returnStatus = null;
        try {
            Exec::run($installCommand, $installationOutput, $returnStatus);
        } catch (Exception $installException) {
        }
        if (isset($installException) || $returnStatus !== Exec::CODE_CLEAN_EXIT) {
            $this->getApplication()->setAutoExit(true);
            throw new RuntimeException(sprintf('Installation failed (Exit code %s). %s', $returnStatus, $installationOutput), 1, $installException);
        }
        $output->writeln('<info>Successfully installed Magento</info>');
        $encryptionKey = trim(substr(strstr($installationOutput, ':'), 1));
        $output->writeln('<comment>Encryption Key:</comment> <info>' . $encryptionKey . '</info>');
    }