Aimeos\ShopBundle\Composer\ScriptHandler::getConsoleDir PHP Method

getConsoleDir() protected static method

Returns a relative path to the directory that contains the console command.
protected static getConsoleDir ( Composer\Script\CommandEvent $event ) : string
$event Composer\Script\CommandEvent Command event object
return string The path to the console directory
    protected static function getConsoleDir(CommandEvent $event)
    {
        $options = self::getOptions($event);
        if (isset($options['symfony-bin-dir']) && is_dir($options['symfony-bin-dir'])) {
            return $options['symfony-bin-dir'];
        }
        if (isset($options['symfony-app-dir']) && is_dir($options['symfony-app-dir'])) {
            return $options['symfony-app-dir'];
        }
        throw new \RuntimeException(sprintf('Console directory not found. Neither %1$s nor %2$s option exist', 'symfony-app-dir', 'symfony-bin-dir'));
    }