Fix run-script --list failing to handle native script handlers, fixes #7069
parent
4bddcd7124
commit
ec9ba46c5f
|
@ -114,10 +114,14 @@ EOT
|
||||||
$io->writeError('<info>scripts:</info>');
|
$io->writeError('<info>scripts:</info>');
|
||||||
$table = array();
|
$table = array();
|
||||||
foreach ($scripts as $name => $script) {
|
foreach ($scripts as $name => $script) {
|
||||||
$cmd = $this->getApplication()->find($name);
|
|
||||||
$description = '';
|
$description = '';
|
||||||
if ($cmd instanceof ScriptAliasCommand) {
|
try {
|
||||||
$description = $cmd->getDescription();
|
$cmd = $this->getApplication()->find($name);
|
||||||
|
if ($cmd instanceof ScriptAliasCommand) {
|
||||||
|
$description = $cmd->getDescription();
|
||||||
|
}
|
||||||
|
} catch (\Symfony\Component\Console\Exception\CommandNotFoundException $e) {
|
||||||
|
// ignore scripts that have no command associated, like native Composer script listeners
|
||||||
}
|
}
|
||||||
$table[] = array(' '.$name, $description);
|
$table[] = array(' '.$name, $description);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue