Skip to content

Commit ccc6f16

Browse files
committed
Command node:list: Fix wrong node counter
The displayed node counter for "node:list [path_without_wildcards]" is always 1.
1 parent a1854c4 commit ccc6f16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ public function execute(InputInterface $input, OutputInterface $output)
124124
$this->renderNode($node, $table, [], $filter);
125125

126126
if ($table->getNumberOfRows() > 0) {
127-
$this->nbNodes++;
128127
$output->writeln(sprintf('<pathbold>%s</pathbold> [%s] > %s',
129128
$node->getPath(),
130129
$node->getPrimaryNodeType()->getName(),
@@ -204,9 +203,10 @@ private function renderChildren($currentNode, $table, $spacers, $filter = null)
204203
$newSpacers[] = '| ';
205204
}
206205

207-
$this->nbNodes++;
208206
$this->renderNode($child, $table, $newSpacers);
209207
}
208+
209+
$this->nbNodes++;
210210
}
211211

212212
if ($this->showTemplate) {

0 commit comments

Comments
 (0)