Merge pull request #3570 from MVKozlov/patch-1

Return non-zero on display usage
This commit is contained in:
Johannes Meyer 2019-05-22 12:21:46 +02:00 committed by GitHub
commit 5d9aa0895f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -146,11 +146,14 @@ class Cli extends ApplicationBootstrap
{
$loader = $this->cliLoader();
$loader->parseParams();
$loader->dispatch();
$result = $loader->dispatch();
Benchmark::measure('All done');
if ($this->showBenchmark) {
Benchmark::dump();
}
if ($result === false) {
exit(3);
}
}
protected function dispatchEndless()

View File

@ -198,6 +198,7 @@ abstract class Command
$this->commandName,
$action
);
return false;
}
public function init()