Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExecCommand.php

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\Command

Code

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]);
}
RSS feed
Powered by Drupal