Skip to content
Permalink
Browse files

Fix #1907 - exit expicitly when composer.json is invalid

  • Loading branch information...
muglug committed Jul 6, 2019
1 parent e6bd30c commit 40a5194cce7305c5f71d342e2de3bb625d877d73
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/command_functions.php
@@ -125,7 +125,11 @@ function getVendorDir($current_dir)
}
if (!$composer_json = json_decode(file_get_contents($composer_json_path), true)) {
throw new UnexpectedValueException('Invalid composer.json at ' . $composer_json_path);
fwrite(
STDERR,
'Invalid composer.json at ' . $composer_json_path . "\n"
);
exit(1);
}
if (isset($composer_json['config']['vendor-dir'])) {

0 comments on commit 40a5194

Please sign in to comment.
You can’t perform that action at this time.