diff --git a/src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php b/src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php index 2ec5bb1a..126f1e6f 100644 --- a/src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php +++ b/src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php @@ -64,6 +64,7 @@ protected function configure() public function execute(InputInterface $input, OutputInterface $output) { + $globHelper = $this->get('dtl.glob.helper'); $this->formatter = $this->get('helper.result_formatter'); $this->textHelper = $this->get('helper.text'); $this->maxLevel = $input->getOption('level'); @@ -92,6 +93,10 @@ public function execute(InputInterface $input, OutputInterface $output) $nodes = array($session->getNodeByPathOrIdentifier($path)); $filter = null; } catch (\Exception $e) { + if (!$globHelper->isGlobbed($session->getAbsPath($path))) { + throw $e; + } + $parentPath = $this->get('helper.path')->getParentPath($path); $filter = substr($path, strlen($parentPath)); diff --git a/src/PHPCR/Shell/DependencyInjection/Container.php b/src/PHPCR/Shell/DependencyInjection/Container.php index 0c6c23be..e6ee0ba2 100644 --- a/src/PHPCR/Shell/DependencyInjection/Container.php +++ b/src/PHPCR/Shell/DependencyInjection/Container.php @@ -100,6 +100,8 @@ public function registerPhpcr() $repositoryDefinition->setFactoryService('phpcr.session_manager')->setFactoryMethod('getRepository'); $sessionDefinition->setFactoryService('phpcr.session_manager')->setFactoryMethod('getSession'); + + $this->register('dtl.glob.helper', 'DTL\Glob\GlobHelper'); } public function registerEvent()