From 36365e5aa7e80f01634ddba3b56c2db3f76680f3 Mon Sep 17 00:00:00 2001 From: MaximAL Date: Wed, 6 Mar 2019 20:01:30 +0300 Subject: [PATCH] Make requirements checker return error if there were failed checks (#196) --- requirements.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.php b/requirements.php index 91a0fb0..ac16b8b 100644 --- a/requirements.php +++ b/requirements.php @@ -157,4 +157,6 @@ if (!version_compare(phpversion(), '5.5', '>=')) { ); } -$requirementsChecker->checkYii()->check($requirements)->render(); +$result = $requirementsChecker->checkYii()->check($requirements)->getResult(); +$requirementsChecker->render(); +exit($result['summary']['errors'] === 0 ? 0 : 1);