Add a warning when trying to run integrity:check-core on git

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-01-15 16:37:46 +01:00
parent 90c3013d40
commit 2e2a2eefd5
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,11 @@ class CheckCore extends Base {
* {@inheritdoc } * {@inheritdoc }
*/ */
protected function execute(InputInterface $input, OutputInterface $output): int { 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(); $result = $this->checker->verifyCoreSignature();
$this->writeArrayInOutputFormat($input, $output, $result); $this->writeArrayInOutputFormat($input, $output, $result);
if (count($result) > 0) { if (count($result) > 0) {