Merge pull request #386 from havvg/1.5
enforce error message if bundle argument is set
This commit is contained in:
commit
b02a4feec3
|
@ -128,11 +128,13 @@ abstract class AbstractCommand extends ContainerAwareCommand
|
||||||
|
|
||||||
$this->checkConfiguration();
|
$this->checkConfiguration();
|
||||||
|
|
||||||
if ($input->hasArgument('bundle') && '@' === substr($input->getArgument('bundle'), 0, 1)) {
|
if ($input->hasArgument('bundle')) {
|
||||||
$this->bundle = $this
|
$bundleName = $input->getArgument('bundle');
|
||||||
->getContainer()
|
if (0 === strpos($bundleName, '@')) {
|
||||||
->get('kernel')
|
$bundleName = substr($bundleName, 1);
|
||||||
->getBundle(substr($input->getArgument('bundle'), 1));
|
}
|
||||||
|
|
||||||
|
$this->bundle = $this->getContainer()->get('kernel')->getBundle($bundleName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue