1
0
Fork 0

Fix regression in global command, fixes #5266

pull/5276/head
Jordi Boggiano 2016-04-29 15:31:18 +01:00
parent 7d246196db
commit 2bcd723b54
2 changed files with 5 additions and 2 deletions

View File

@ -76,6 +76,7 @@ EOT
// create new input without "global" command prefix
$input = new StringInput(preg_replace('{\bg(?:l(?:o(?:b(?:a(?:l)?)?)?)?)?\b}', '', $input->__toString(), 1));
$this->getApplication()->resetComposer();
return $this->getApplication()->run($input, $output);
}

View File

@ -116,7 +116,9 @@ class Application extends BaseApplication
}
}
if ($commandName !== 'global' && $commandName !== 'outdated') {
$isProxyCommand = $commandName === 'global' || $commandName === 'outdated';
if (!$isProxyCommand) {
$io->writeError(sprintf(
'Running %s (%s) with %s on %s',
Composer::VERSION,
@ -194,7 +196,7 @@ class Application extends BaseApplication
$this->io->enableDebugging($startTime);
}
if (!$input->hasParameterOption('--no-plugins')) {
if (!$input->hasParameterOption('--no-plugins') && !$isProxyCommand) {
foreach ($this->getPluginCommands() as $command) {
if ($this->has($command->getName())) {
$io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>');