Disable progress when no-ansi is specified, refs #3612
parent
e0d36e19eb
commit
c58b7d917c
|
@ -16,6 +16,8 @@ use Composer\Composer;
|
|||
use Composer\Console\Application;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\IO\NullIO;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Command\Command as BaseCommand;
|
||||
|
||||
/**
|
||||
|
@ -102,4 +104,16 @@ abstract class Command extends BaseCommand
|
|||
{
|
||||
$this->io = $io;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function initialize(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if (true === $input->hasParameterOption(array('--no-ansi')) && $input->hasOption('no-progress')) {
|
||||
$input->setOption('no-progress', true);
|
||||
}
|
||||
|
||||
parent::initialize($input, $output);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ EOT
|
|||
*/
|
||||
protected function initialize(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
parent::initialize($input, $output);
|
||||
|
||||
if ($input->getOption('global') && 'composer.json' !== $input->getOption('file')) {
|
||||
throw new \RuntimeException('--file and --global can not be combined');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue