Executes Composer and runs a specified command (e.g. install / update)
773363
public function execute()
    {
        $cmd = 'rm -Rf "%s"';
        if (IS_WIN) {
            $cmd = 'rmdir /S /Q "%s"';
        }
        $this->phpci->executeCommand($cmd, $this->phpci->buildPath . 'composer.phar');
        $this->phpci->executeCommand($cmd, $this->phpci->buildPath . 'composer.lock');

        $success = true;

        foreach ($this->remove as $file) {
            $ok = $this->phpci->executeCommand($cmd, $this->phpci->buildPath . $file);

            if (!$ok) {
                $success = false;
            }
        }

        return $success;
    }
316083
function run() {
  var bin = path.resolve(__dirname, '../node_modules/.bin/mocha');
  var args = Array.prototype.slice.call(arguments);
  var fn = args.pop();
  var cmd = [bin].concat(args).join(' ') + ' --no-colors';
  exec(cmd, fn);
}
670613
public function install()
	{
		if ($this->arguments->getOpt('package'))
		{
			$package = $this->arguments->getOpt('package');
		}
		if ($this->arguments->getOpt('version'))
		{
			$version = $this->arguments->getOpt('version');
		}
		if (!isset($package) || !isset($version))
		{
			$this->output->error('A package name and version is required');
		}

		try
		{
			Composer::installPackage($package, $version);
		}
		catch (Exception $e)
		{

		}
		$this->output->addLine("Done.  $package($version) installed.");
	}
1122748
def _execute_install_command(cmd, parse_output, errors, parsed_packages):
    '''
    
    '''
    out = __salt__['cmd.run_all'](
        cmd,
        output_loglevel='trace',
        python_shell=False
    )
    if out['retcode'] != 0:
        if out['stderr']:
            errors.append(out['stderr'])
        else:
            errors.append(out['stdout'])
    elif parse_output:
        parsed_packages.update(_parse_reported_packages_from_install_output(out['stdout']))
403581
public function execute() {
        global $CFG;
        require_once($CFG->dirroot . '/repository/lib.php');

        $fs = get_file_storage();
        // Find all generated thumbnails and group them in array by itemid (itemid == repository instance id).
        $allfiles = array_merge(
            $fs->get_area_files(SYSCONTEXTID, 'repository_filesystem', 'thumb'),
            $fs->get_area_files(SYSCONTEXTID, 'repository_filesystem', 'icon')
        );
        $filesbyitem = array();
        foreach ($allfiles as $file) {
            if (!isset($filesbyitem[$file->get_itemid()])) {
                $filesbyitem[$file->get_itemid()] = array();
            }
            $filesbyitem[$file->get_itemid()][] = $file;
        }
        // Find all instances of repository_filesystem.
        $instances = \repository::get_instances(array('type' => 'filesystem'));
        // Loop through all itemids of generated thumbnails.
        foreach ($filesbyitem as $itemid => $files) {
            if (!isset($instances[$itemid]) || !($instances[$itemid] instanceof repository_filesystem)) {
                // Instance was deleted.
                $fs->delete_area_files(SYSCONTEXTID, 'repository_filesystem', 'thumb', $itemid);
                $fs->delete_area_files(SYSCONTEXTID, 'repository_filesystem', 'icon', $itemid);
                mtrace(" instance $itemid does not exist: deleted all thumbnails");
            } else {
                // Instance has some generated thumbnails, check that they are not outdated.
                $instances[$itemid]->remove_obsolete_thumbnails($files);
            }
        }
    }
535030
public function run() {
        $command = str_replace('.', '_', $this->_args[0]);
        $params = array_slice($this->_args, 1);
        foreach (Mage::helper('turpentine/varnish')->getSockets() as $socket) {
            $response = call_user_func_array(array($socket, $command), $params);
            $this->_write("=== Result from server [%s]: %d ===\n%s\n",
                $socket->getConnectionString(), $response['code'],
                $response['text']);
        }
    }
1179612
function run(appName, command, callback) {
    commons.get(format('/%s/apps/%s/run/', deis.version, appName), callback);
  }
1351521
function processCommand (cmd, options) {
	var module = checkForModule(cmd);

	// execute module if exists
	if (module) {
		return executeModule(module, options);
	} else {
		processInstallCommands(['install', cmd], options, function (err) {
			if (err) {
				noModuleFound(cmd);
			}
			module = checkForModule(cmd);

			// execute module if exists now
			if (module) {
				executeModule(module, options);
			}
		});
	}
}
1219731
public function main()
    {
        $commandLine = $this->prepareCommandLine();
        $this->log("Executing " . $commandLine);
        passthru($commandLine, $returnCode);

        if ($returnCode > 0) {
            throw new BuildException("Composer execution failed");
        }
    }
595456
public function run($data)
    {
        $processId = $data['id'];

        $GLOBALS['log']->debug('Installation process ['.$processId.']: start run.');

        if (empty($processId)) {
            throw new Error('Installation package ID was not specified.');
        }

        $this->setProcessId($processId);

        $this->initialize();

        /** check if an archive is unzipped, if no then unzip */
        $packagePath = $this->getPackagePath();
        if (!file_exists($packagePath)) {
            $this->unzipArchive();
            $this->isAcceptable();
        }

        //check permissions copied and deleted files
        $this->checkIsWritable();

        $this->enableMaintenanceMode();

        $this->beforeRunAction();

        $this->backupExistingFiles();

        //beforeInstallFiles
        if (!$this->copyFiles('before')) {
            $this->throwErrorAndRemovePackage('Cannot copy beforeInstall files.');
        }

        /* run before install script */
        if (!isset($data['skipBeforeScript']) || !$data['skipBeforeScript']) {
            $this->runScript('before');
        }

        /* remove files defined in a manifest "deleteBeforeCopy" */
        $this->deleteFiles('deleteBeforeCopy', true);

        /* copy files from directory "Files" to EspoCRM files */
        if (!$this->copyFiles()) {
            $this->throwErrorAndRemovePackage('Cannot copy files.');
        }

        /* remove files defined in a manifest */
        $this->deleteFiles('delete', true);

        $this->deleteFiles('vendor');
        $this->copyFiles('vendor');

        $this->disableMaintenanceMode();

        if (!isset($data['skipSystemRebuild']) || !$data['skipSystemRebuild']) {
            if (!$this->systemRebuild()) {
                $this->throwErrorAndRemovePackage('Error occurred while EspoCRM rebuild.');
            }
        }

        //afterInstallFiles
        if (!$this->copyFiles('after')) {
            $this->throwErrorAndRemovePackage('Cannot copy afterInstall files.');
        }

        /* run after install script */
        if (!isset($data['skipAfterScript']) || !$data['skipAfterScript']) {
            $this->runScript('after');
        }

        $this->afterRunAction();

        $this->finalize();

        /* delete unziped files */
        $this->deletePackageFiles();

        if ($this->getManifestParam('skipBackup')) {
            $this->getFileManager()->removeInDir([$this->getPath('backupPath'), self::FILES]);
        }

        $GLOBALS['log']->debug('Installation process ['.$processId.']: end run.');

        $this->clearCache();
    }
903756
def run_commands (self):
        """"""
        cwd = os.getcwd()
        data = []
        data.append('config_dir = %r' % os.path.join(cwd, "config"))
        data.append("install_data = %r" % cwd)
        data.append("install_scripts = %r" % cwd)
        self.create_conf_file(data)
        super(MyDistribution, self).run_commands()
1054930
def _execute_command(self, command, *args):
        """"""
        try:
            command(*args)
        except libvirt.libvirtError as error:
            raise RuntimeError("Unable to execute command. %s" % error)
996387
public function execute(){
    	$ext = common_configuration_ComponentFactory::buildPHPExtension('json');
        $report = $ext->check();
                                       
        // We fake JSON encoding for a gracefull response in any case.
        $json = $report->getStatus() == common_configuration_Report::VALID;
        if (!$json){
        	$data = '{"type": "SyncReport", "value": { "json": '. (($json) ? 'true' : 'false') . '}}';
        }
        else{
        	$localesDir = dirname(__FILE__) . '/../../locales';
        	$data = json_encode(array('type' => 'SyncReport', 'value' => array(
        		'json' => true,
        		'rootURL' => self::getRootUrl(),
        		'availableDrivers' => self::getAvailableDrivers(),
        		'availableLanguages' => self::getAvailableLanguages($localesDir),
        	    'availableTimezones' => self::getAvailableTimezones()
        	)));
        }
                                   
        $this->setResult(new tao_install_services_Data($data));
    }
122796
private function _execute_command() {
		$app = new Application( 'Codeception', \Codeception\Codecept::VERSION );
		$app->add( new \WPCC\Command\Build( 'build' ) );
		$app->add( new \Codeception\Command\Console( 'console' ) );
		$app->add( new \WPCC\Command\Bootstrap( 'bootstrap' ) );
		$app->add( new \Codeception\Command\GenerateCept( 'generate-cept' ) );
		$app->add( new \Codeception\Command\GenerateCest( 'generate-cest' ) );
		$app->add( new \Codeception\Command\GenerateTest( 'generate-test' ) );
		$app->add( new \Codeception\Command\GeneratePhpUnit( 'generate-phpunit' ) );
		$app->add( new \Codeception\Command\GenerateSuite( 'generate-suite' ) );
		$app->add( new \Codeception\Command\GenerateHelper( 'generate-helper' ) );
		$app->add( new \Codeception\Command\GenerateScenarios( 'generate-scenarios' ) );
		$app->add( new \Codeception\Command\Clean( 'clean' ) );
		$app->add( new \Codeception\Command\GenerateGroup( 'generate-group' ) );
		$app->add( new \Codeception\Command\GeneratePageObject( 'generate-pageobject' ) );
		$app->add( new \Codeception\Command\GenerateStepObject( 'generate-stepobject' ) );
		$app->run( new ArgvInput() );
	}
1301259
protected function prepareExecute()
    {
        if (class_exists(ComposerInformation::class)) {
            $this->version = ComposerInformation::getInstalledVersion('windwalker/core');
        }

        if ($this->getRootCommand()->getOption('n')) {
            IOFactory::getIO()->setInput(new NullInput());
        }
    }
472383
protected function runProcess($command, $messages = '', $output)
    {
        // Generate autoload file from composer
        $process = new Process($command);

        if (is_array($messages)) {
            foreach ($messages as $message) {
                $output->writeln("<info>{$message}</info>");
            }
            $output->writeln('');
        } elseif ($messages != '') {
            $output->writeln("<info>{$messages}</info>");
            $output->writeln('');
        }

        $process->run(function ($type, $buffer) {
            if (Process::ERR === $type) {
                echo $buffer;
            } else {
                echo $buffer;
            }
        });

        $output->writeln('');
    }
20167
def execute(self):
        
        if self.choice in self.commands.keys():
            if self.choice == "i":
                PackageManager(self.packages).install("")
            elif self.choice in ["u", "r"]:
                PackageManager(self.packages).upgrade(
                    self.commands[self.choice][11:])