diff --git a/src/Composer/Command/ValidateCommand.php b/src/Composer/Command/ValidateCommand.php
index 18a854e4a..5e244feff 100644
--- a/src/Composer/Command/ValidateCommand.php
+++ b/src/Composer/Command/ValidateCommand.php
@@ -46,18 +46,18 @@ EOT
if (!file_exists($file)) {
$output->writeln(''.$file.' not found.');
- return;
+ return 1;
}
if (!is_readable($file)) {
$output->writeln(''.$file.' is not readable.');
- return;
+ return 1;
}
try {
JsonFile::parseJson(file_get_contents($file));
} catch (\Exception $e) {
$output->writeln(''.$e->getMessage().'');
- return;
+ return 1;
}
$output->writeln(''.$file.' is valid');