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

Breadcrumb

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

function RunScriptCommand::listScripts

1 call to RunScriptCommand::listScripts()
RunScriptCommand::execute in vendor/composer/composer/src/Composer/Command/RunScriptCommand.php
Executes the current command.

File

vendor/composer/composer/src/Composer/Command/RunScriptCommand.php, line 142

Class

RunScriptCommand
@author Fabien Potencier <fabien.potencier@gmail.com>

Namespace

Composer\Command

Code

protected function listScripts(OutputInterface $output) : int {
    $scripts = $this->getScripts();
    if (count($scripts) === 0) {
        return 0;
    }
    $io = $this->getIO();
    $io->writeError('<info>scripts:</info>');
    $table = [];
    foreach ($scripts as $script) {
        $table[] = [
            '  ' . $script['name'],
            $script['description'],
        ];
    }
    $this->renderTable($table, $output);
    return 0;
}
RSS feed
Powered by Drupal