diff options
author | Joas Schilling <coding@schilljs.com> | 2021-01-15 16:37:46 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-01-18 11:32:50 +0100 |
commit | 2e2a2eefd50ee2fec603ffdc56de4a89296f907f (patch) | |
tree | 961838005e710c15aed304efaa908bc2c17c8fcd /core/Command/Integrity | |
parent | 90c3013d4015354f8d9f954e6d685bbc0a9d99a1 (diff) | |
download | nextcloud-server-2e2a2eefd50ee2fec603ffdc56de4a89296f907f.tar.gz nextcloud-server-2e2a2eefd50ee2fec603ffdc56de4a89296f907f.zip |
Add a warning when trying to run integrity:check-core on git
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/Integrity')
-rw-r--r-- | core/Command/Integrity/CheckCore.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php index 6f319abdf74..cca72535f36 100644 --- a/core/Command/Integrity/CheckCore.php +++ b/core/Command/Integrity/CheckCore.php @@ -61,6 +61,11 @@ class CheckCore extends Base { * {@inheritdoc } */ 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) { |