Altax\Command\Builtin\UpdateCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $newWorkDir = $this->getNewWorkingDir($input);
        if (!is_dir($newWorkDir)) {
            throw new \RuntimeException("Not found directory:" . $newWorkDir);
        }
        $oldWorkingDir = getcwd();
        chdir($newWorkDir);
        $io = new ConsoleIO($input, $output, $this->getHelperSet());
        $composer = Factory::create($io);
        $this->setComposer($composer);
        $this->setIO($io);
        $statusCode = parent::execute($input, $output);
        if (isset($oldWorkingDir)) {
            chdir($oldWorkingDir);
        }
        return $statusCode;
    }