Better output when required parameters are missing

This commit is contained in:
Niklas Keller
2016-03-23 23:01:18 +01:00
parent 5e0d126834
commit 67e4fab090

View File

@@ -95,9 +95,15 @@ try {
if (count($argv) === 3 && in_array($argv[2], ["h", "-h", "--help", "help"], true)) {
$climate->usage(["bin/acme {$argv[1]}"]);
$climate->br();
exit(0);
} else {
$climate->usage(["bin/acme {$argv[1]}"]);
$climate->br();
$climate->error($e->getMessage());
$climate->br();
exit(1);
}
}