phacility/phabricator · error · PhutilArgumentUsageException

Specify the credential type to revoke with "--type" or "--ev

Error message

Specify the credential type to revoke with "--type" or "--everything", but not both.

What it means

Error "Specify the credential type to revoke with "--type" or "--everything", but not both." thrown in phacility/phabricator.

Source

Thrown at src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:75

    // "--type" to filter the list, but not compatible with target selection
    // flags like "--from".
    $is_list = $args->getArg('list');

    $type = $args->getArg('type');
    $is_everything = $args->getArg('everything');
    if ($type === null && !$is_everything) {
      if ($is_list) {
        // By default, "bin/revoke --list" implies "--everything".
        $types = $all_types;
      } else {
        throw new PhutilArgumentUsageException(
          pht(
            'Specify the credential type to revoke with "--type" or specify '.
            '"--everything". Use "--list" to list available credential '.
            'types.'));
      }
    } else if (strlen($type) && $is_everything) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify the credential type to revoke with "--type" or '.
          '"--everything", but not both.'));
    } else if ($is_everything) {
      $types = $all_types;
    } else {
      if (empty($all_types[$type])) {
        throw new PhutilArgumentUsageException(
          pht(
            'Credential type "%s" is not valid. Valid credential types '.
            'are: %s.',
            $type,
            implode(', ', array_keys($all_types))));
      }
      $types = array($all_types[$type]);
    }

    $is_everywhere = $args->getArg('everywhere');

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/bdcbdb65bb19c8ec. Report an issue: GitHub.