Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not do realpath as this breaks the error message #112

Merged
merged 1 commit into from May 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/PHPCR/Util/Console/Command/NodeTypeRegisterCommand.php
Expand Up @@ -83,11 +83,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
foreach ($filePaths as $filePath) {
$cnd = file_get_contents($filePath);
$this->updateFromCnd($output, $session, $cnd, $allowUpdate);
$output->writeln(sprintf('Registered: <info>%s</info>', $filePath));
$output->writeln(sprintf('Node type definition: <info>%s</info>', $filePath));
$count++;
}

$output->writeln(sprintf('%d node definition file(s)', $count));
$output->writeln(sprintf('%d node definition(s) registered', $count));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to simply "Node type definition: %s" and then the summary is already "%d node definition(s) registered". Trying to be as concise as possible.


return 0;
}
Expand Down Expand Up @@ -131,7 +131,6 @@ protected function getFilePaths($definitions)
$filePaths = array();

foreach ($definitions as $definition) {
$definition = realpath($definition);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

if (is_dir($definition)) {
$dirHandle = opendir($definition);
Expand All @@ -154,7 +153,7 @@ protected function getFilePaths($definitions)
} else {
if (!file_exists($definition)) {
throw new \InvalidArgumentException(
sprintf("Node type definition file '<info>%s</info>' does not exist.", $definition)
sprintf("Node type definition file / folder '<info>%s</info>' does not exist.", $definition)
);
}

Expand Down