Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 9a52cda

Browse files
committed
Merge branch 'hotfix/86-exit-code'
Close #91 Fixes #86
2 parents 52ca693 + 70e7633 commit 9a52cda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/book/usage.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ $runner->addCheck(new Check\DiskFree(100000000, '/tmp'));
8888
$runner->addReporter(new BasicConsole(80, true));
8989

9090
// Run all checks
91-
$runner->run();
91+
$results = $runner->run();
92+
93+
// Emit an appropriate exit code
94+
$status = ($results->getFailureCount() + $results->getWarningCount()) > 0 ? 1 : 0;
95+
exit($status);
9296
```
9397

9498
You can now run the file in your console (command line):

0 commit comments

Comments
 (0)