1
0
Fork 0

Set return code to non-zero when validate fails

pull/156/merge
Jordi Boggiano 2011-12-12 22:23:38 +01:00
parent 666ac623f4
commit 7caf61fc66
1 changed files with 3 additions and 3 deletions

View File

@ -46,18 +46,18 @@ EOT
if (!file_exists($file)) {
$output->writeln('<error>'.$file.' not found.</error>');
return;
return 1;
}
if (!is_readable($file)) {
$output->writeln('<error>'.$file.' is not readable.</error>');
return;
return 1;
}
try {
JsonFile::parseJson(file_get_contents($file));
} catch (\Exception $e) {
$output->writeln('<error>'.$e->getMessage().'</error>');
return;
return 1;
}
$output->writeln('<info>'.$file.' is valid</info>');