function ExecCommand::interact
Overrides Command::interact
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ ExecCommand.php, line 54
Class
- ExecCommand
- @author Davey Shafik <me@daveyshafik.com>
Namespace
Composer\CommandCode
protected function interact(InputInterface $input, OutputInterface $output) : void {
$binaries = $this->getBinaries(false);
if (count($binaries) === 0) {
return;
}
if ($input->getArgument('binary') !== null || $input->getOption('list')) {
return;
}
$io = $this->getIO();
/** @var int $binary */
$binary = $io->select('Binary to run: ', $binaries, '', 1, 'Invalid binary name "%s"');
$input->setArgument('binary', $binaries[$binary]);
}