Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Integrity/CheckCore.php')
-rw-r--r--core/Command/Integrity/CheckCore.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php
index bebfbea560e..53ac3ec8bc8 100644
--- a/core/Command/Integrity/CheckCore.php
+++ b/core/Command/Integrity/CheckCore.php
@@ -3,6 +3,8 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Carla Schroder <carla@owncloud.com>
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Joas Schilling <coding@schilljs.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Victor Dubiniuk <dubiniuk@owncloud.com>
*
@@ -21,7 +23,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
namespace OC\Core\Command\Integrity;
use OC\Core\Command\Base;
@@ -58,11 +59,17 @@ class CheckCore extends Base {
/**
* {@inheritdoc }
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
+ if (!$this->checker->isCodeCheckEnforced()) {
+ $output->writeln('<comment>integrity:check-core can not be used on git checkouts</comment>');
+ return 2;
+ }
+
$result = $this->checker->verifyCoreSignature();
$this->writeArrayInOutputFormat($input, $output, $result);
- if (count($result)>0){
+ if (count($result) > 0) {
return 1;
}
+ return 0;
}
}