setName('integrity:check-app')
->setDescription('Check integrity of an app using a signature.')
->addArgument('appid', InputArgument::REQUIRED, 'Application to check')
->addOption('path', null, InputOption::VALUE_OPTIONAL, 'Path to application. If none is given it will be guessed.');
}
/**
* {@inheritdoc }
*/
protected function execute(InputInterface $input, OutputInterface $output): int {
$appid = $input->getArgument('appid');
$path = (string)$input->getOption('path');
$result = $this->checker->verifyAppSignature($appid, $path, true);
$this->writeArrayInOutputFormat($input, $output, $result);
if (count($result) > 0) {
$output->writeln('' . count($result) . ' errors found', OutputInterface::VERBOSITY_VERBOSE);
return 1;
}
$output->writeln('No errors found', OutputInterface::VERBOSITY_VERBOSE);
return 0;
}
}