Skip to content

Commit 2e4a271

Browse files
committed
TASK: Display error message if the node is not found
1 parent fcb18a2 commit 2e4a271

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Command/NodeIndexCommandController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ public function indexNodeCommand($identifier, $workspace = null)
143143
$indexNode = function ($identifier, Workspace $workspace, array $dimensions) {
144144
$context = $this->createContentContext($workspace->getName(), $dimensions);
145145
$node = $context->getNodeByIdentifier($identifier);
146+
if ($node === null) {
147+
$this->outputLine('Node with the given identifier is not found.');
148+
$this->quit();
149+
}
146150
$this->outputLine();
147151
$this->outputLine('Index node "%s" (%s)', [
148152
$node->getLabel(),

0 commit comments

Comments
 (0)