Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DiagnoseCommand.php

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\Command

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal