function DiagnoseCommand::checkPubKeys
Return value
string[]|true
1 call to DiagnoseCommand::checkPubKeys()
- DiagnoseCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php - Executes the current command.
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php, line 513
Class
- DiagnoseCommand
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\CommandCode
private function checkPubKeys(Config $config) {
$home = $config->get('home');
$errors = [];
$io = $this->getIO();
if (file_exists($home . '/keys.tags.pub') && file_exists($home . '/keys.dev.pub')) {
$io->write('');
}
if (file_exists($home . '/keys.tags.pub')) {
$io->write('Tags Public Key Fingerprint: ' . Keys::fingerprint($home . '/keys.tags.pub'));
}
else {
$errors[] = '<error>Missing pubkey for tags verification</error>';
}
if (file_exists($home . '/keys.dev.pub')) {
$io->write('Dev Public Key Fingerprint: ' . Keys::fingerprint($home . '/keys.dev.pub'));
}
else {
$errors[] = '<error>Missing pubkey for dev verification</error>';
}
if ($errors) {
$errors[] = '<error>Run composer self-update --update-keys to set them up</error>';
}
return $errors ?: true;
}