Merge pull request #7648 from NickWilde1990/allow-plugin-commands-from-child-folders
Allow plugin commands to be run from child folders like core commandspull/7641/head^2
commit
8bead93343
|
@ -16,6 +16,7 @@ use Composer\IO\NullIO;
|
||||||
use Composer\Util\Platform;
|
use Composer\Util\Platform;
|
||||||
use Composer\Util\Silencer;
|
use Composer\Util\Silencer;
|
||||||
use Symfony\Component\Console\Application as BaseApplication;
|
use Symfony\Component\Console\Application as BaseApplication;
|
||||||
|
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
@ -125,6 +126,9 @@ class Application extends BaseApplication
|
||||||
if ($name = $this->getCommandName($input)) {
|
if ($name = $this->getCommandName($input)) {
|
||||||
try {
|
try {
|
||||||
$commandName = $this->find($name)->getName();
|
$commandName = $this->find($name)->getName();
|
||||||
|
} catch (CommandNotFoundException $e) {
|
||||||
|
// we'll check command validity again later after plugins are loaded
|
||||||
|
$commandName = false;
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue