update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
15
vendor/symfony/console/Application.php
vendored
15
vendor/symfony/console/Application.php
vendored
@@ -761,6 +761,21 @@ public function find(string $name)
|
||||
}));
|
||||
}
|
||||
|
||||
// check whether all commands left are aliases to the same one
|
||||
if (\count($commands) > 1) {
|
||||
$uniqueCommands = array_unique(array_map(function ($nameOrAlias) use (&$commandList) {
|
||||
if (!$commandList[$nameOrAlias] instanceof Command) {
|
||||
$commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
|
||||
}
|
||||
|
||||
return $commandList[$nameOrAlias]->getName();
|
||||
}, $commands));
|
||||
|
||||
if (1 === \count($uniqueCommands)) {
|
||||
$commands = [reset($uniqueCommands)];
|
||||
}
|
||||
}
|
||||
|
||||
if (\count($commands) > 1) {
|
||||
$usableWidth = $this->terminal->getWidth() - 10;
|
||||
$abbrevs = array_values($commands);
|
||||
|
||||
Reference in New Issue
Block a user