Carew\Carew::doRun PHP Method

doRun() public method

public doRun ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    public function doRun(InputInterface $input, OutputInterface $output)
    {
        if ($input->hasParameterOption('--base-dir')) {
            $baseDir = realpath($input->getParameterOption('--base-dir'));
            if (!is_dir($baseDir)) {
                throw new \InvalidArgumentException(sprintf('Base directory does not exist or it is not a readable directory: "%s".', $input->getParameterOption('--base-dir')));
            }
            // We have to load extension after the override of `base_dir`
            // configuration; because extension can rely on configuration inside the
            // `config.yml` file.
            $this->container['base_dir'] = $baseDir;
        }
        $this->loadExtensions();
        return parent::doRun($input, $output);
    }