Executes specified program in current process space.

@param string $path
@param array  $args
@param array  $envs

@throws RuntimeException When get an error.
972016
public function execute($path, array $args = [], array $envs = [])
    {
        if (false === @pcntl_exec($path, $args, $envs)) {
            throw new RuntimeException('Error when executing command');
        }
    }
1216076
public function setRuntimePath($path)
    {
        $path = realpath($path);
        if (is_dir($path)) {
            $this->_runtimePath = $path;
        } else {
            throw new Exception("日志根目录不存在", 101200101);
        }
    }
1252544
public function run($path)
    {

        $this->createMigrationRepository();
        $repository = $this->migrator->getRepository();
        $migrations = $this->migrator->getMigrationFiles($path);
        $ran        = $repository->getRan();
        if (!empty($migrations)) {
            $files = array_keys($migrations);
            foreach ($files as $name) {
                if (!in_array($name, $ran)) {
                    continue;
                }
                $migration            = new stdClass();
                $migration->migration = $name;
                $repository->delete($migration);
            }
        }


        $this->migrator->run($path);
    }
819599
public function execute(array $args = [], array $options = [])
    {
        if (!$this->evaluate($this->condition)) {
            return;
        }

        $this->command->execute($args, $options);
    }
240219
public function run(array $options): void
    {
        // run once
        $this->___checkRun(new AppException("You cannot call App::run() anymore, it's already ".
                "called in skeleton/pub/index.php once"));

        // apply user options (@see skeleton/pub/index.php)
        if (isset($options['env'])) $this->env = $options['env'];
        if (isset($options['root'])) $this->root = $options['root'];
        if (isset($options['config'])) $this->applyConfig($options['config']);

        // check env
        if (empty($this->env)) {
            throw new AppException('Application env is not defined');
        }

        // security & performans checks
        $halt = $this->haltCheck();
        if ($halt != null) {
            $this->halt($halt[1], $halt[0]);
        }

        $this->applyDefaults();

        $this->request = new Request($this);
        $this->response = new Response($this);

        // @override
        set_global('app', $this);

        // create service
        $service = ServiceFactory::create($this);
        if ($service == null) {
            throw new AppException('Could not create service');
        }

        $this->startOutputBuffer();

        // here!!
        $this->events->fire('service.beforeRun');
        $output = $service->run();
        $this->events->fire('service.afterRun');

        $this->endOutputBuffer($output);
    }
208105
public function run(array $parameters)
    {
        $process = new Process(array_merge(['bin/console'], $parameters));
        $process->setTimeout(null);
        $process->setWorkingDirectory($this->kernel->getProjectDir());

        $exitCode = $process->run();

        if ($exitCode) {
            $error = $process->getErrorOutput();
            $this->logger->error($error);
        }
    }
467777
public function run(array $args)
    {
        Index::info('Help Menu');
        Index::info('- `eve generate <schema*> <namespace>`    Generates files based on schema');
        Index::info('- `eve database <schema*>`                Generates database table/s schema');
        Index::info('- `eve install`                           Generates default framework files');
        Index::info('- `eve job <name*> <data*>`               Executes a job');
		Index::info('- `eve queue <name*> <data*>`             Queues a job');

        die(0);
    }
1079347
public function handleInstall(Args $args)
    {
        $pluginClass = $args->getArgument('class');

        if ($this->manager->hasPluginClass($pluginClass)) {
            throw new RuntimeException(sprintf(
                'The plugin class "%s" is already installed.',
                $pluginClass
            ));
        }

        $this->manager->addPluginClass($pluginClass);

        return 0;
    }
738047
private function Skip($path, $env){

		$path = Less_Parser::winPath(realpath($path));

		if( $path && Less_Parser::FileParsed($path) ){

			if( isset($this->currentFileInfo['reference']) ){
				return true;
			}

			return !isset($this->options['multiple']) && !$env->importMultiple;
		}

	}
861335
protected function execute(array $arguments)
    {
        \array_unshift($arguments, $this->path);
        
        $builder = ProcessBuilder::create($arguments);
        $process = $builder->getProcess();
        $process->run();
        
        if (!$process->isSuccessful()) {
            throw CommandException::factory($process);
        }
        
        // E.g. tesseract --version returns output as error output
        return $process->getOutput() ? $process->getOutput() : $process->getErrorOutput();
    }
186344
public function initializeEnvironment($appPath)
    {
        try {
            // initialize the environment and its configurations
            $this->environment = Environment::getInstance();
            $this->environment->initializeEnvironment($appPath);
        } catch (BootstrapException $e) {
            throw $e;
        }
    }
668861
public function execute(array $args = [], array $options = [])
    {
        foreach ($this->sequence as $command) {
            $command->setConfig($this->getConfig());
            $command->setConfigService($this->getConfigService());
            if ($this->hasOutput() && method_exists($command, 'setOutput')) {
                $command->setOutput($this->getOutput());
            }
            if ($this->hasInput() && method_exists($command, 'setInput')) {
                $command->setInput($this->getInput());
            }
            $command->execute($args, $options);
        }
    }
738402
public function handleDelete(Args $args)
    {
        $pluginClass = $args->getArgument('class');

        if (!$this->manager->hasPluginClass($pluginClass)) {
            throw new RuntimeException(sprintf(
                'The plugin class "%s" is not installed.',
                $pluginClass
            ));
        }

        $this->manager->removePluginClass($pluginClass);

        return 0;
    }
805884
public function projectDotenvDelete($envPath = '.env', $opts = ['force' => false])
    {
        if (!$opts['force']) {
            $this->say(static::MSG_NO_DELETE);
            return false;
        }
        if (!file_exists($envPath)) {
            return true;
        }

        $result = $this->taskFilesystemStack()
            ->remove($envPath)
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return true;
    }
1288442
public function executeSimple($commandline, $dir = null, array $env = [])
    {
        $this->stdErr->writeln(
            'Running command: <info>' . $commandline . '</info>',
            OutputInterface::VERBOSITY_VERBOSE
        );

        if (!empty($env)) {
            $this->showEnvMessage($env);
            $env = $env + $this->getParentEnv();
        } else {
            $env = null;
        }

        $this->showWorkingDirMessage($dir);

        $process = proc_open($commandline, [STDIN, STDOUT, STDERR], $pipes, $dir, $env);

        return proc_close($process);
    }
1196254
final public function run(int $argc, array $argv)
    {
        $ar = new ArgsManager();
        $ar->getArgs($argc, $argv);
    }
280729
public function handleDelete(Args $args)
    {
        $typeName = $args->getArgument('name');

        if (!$this->discoveryManager->hasRootTypeDescriptor($typeName)) {
            throw new RuntimeException(sprintf(
                'The type "%s" does not exist in the module "%s".',
                $typeName,
                $this->modules->getRootModuleName()
            ));
        }

        $this->discoveryManager->removeRootTypeDescriptor($typeName);

        return 0;
    }