Skip to content

Commit 60dc21b

Browse files
committed
Merge pull request #112 from phpcr/fixed_node_type_register
Do not do realpath as this breaks the error message
2 parents 3f4b16f + a66c753 commit 60dc21b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/PHPCR/Util/Console/Command/NodeTypeRegisterCommand.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
8383
foreach ($filePaths as $filePath) {
8484
$cnd = file_get_contents($filePath);
8585
$this->updateFromCnd($output, $session, $cnd, $allowUpdate);
86-
$output->writeln(sprintf('Registered: <info>%s</info>', $filePath));
86+
$output->writeln(sprintf('Node type definition: <info>%s</info>', $filePath));
8787
$count++;
8888
}
8989

90-
$output->writeln(sprintf('%d node definition file(s)', $count));
90+
$output->writeln(sprintf('%d node definition(s) registered', $count));
9191

9292
return 0;
9393
}
@@ -131,7 +131,6 @@ protected function getFilePaths($definitions)
131131
$filePaths = array();
132132

133133
foreach ($definitions as $definition) {
134-
$definition = realpath($definition);
135134

136135
if (is_dir($definition)) {
137136
$dirHandle = opendir($definition);
@@ -154,7 +153,7 @@ protected function getFilePaths($definitions)
154153
} else {
155154
if (!file_exists($definition)) {
156155
throw new \InvalidArgumentException(
157-
sprintf("Node type definition file '<info>%s</info>' does not exist.", $definition)
156+
sprintf("Node type definition file / folder '<info>%s</info>' does not exist.", $definition)
158157
);
159158
}
160159

0 commit comments

Comments
 (0)