Skip to content

Commit 0c0a3e9

Browse files
committed
[Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes symfony#8245)
1 parent 84867b7 commit 0c0a3e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,10 @@ public function find($name)
573573
return $this->get($abbrevs[$searchName][0]);
574574
}
575575

576+
if (isset($abbrevs[$searchName]) && in_array($searchName, $abbrevs[$searchName])) {
577+
return $this->get($searchName);
578+
}
579+
576580
if (isset($abbrevs[$searchName]) && count($abbrevs[$searchName]) > 1) {
577581
$suggestions = $this->getAbbreviationSuggestions($abbrevs[$searchName]);
578582

0 commit comments

Comments
 (0)