phacility/phabricator · error · PhutilArgumentUsageException

Specify the target to revoke credentials from with "--from"

Error message

Specify the target to revoke credentials from with "--from" or "--everywhere", but not both.

What it means

Error "Specify the target to revoke credentials from with "--from" or "--everywhere", but not both." thrown in phacility/phabricator.

Source

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

          $type->getRevokerKey(),
          $type->getRevokerName());

        id(new PhutilConsoleBlock())
          ->addParagraph(tsprintf('%B', $type->getRevokerDescription()))
          ->draw();
      }

      return 0;
    }

    $target = null;
    if (!strlen($from) && !$is_everywhere) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify the target to revoke credentials from with "--from" or '.
          'specify "--everywhere".'));
    } else if (strlen($from) && $is_everywhere) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify the target to revoke credentials from with "--from" or '.
          'specify "--everywhere", but not both.'));
    } else if ($is_everywhere) {
      // Just carry the flag through.
    } else {
      $target = id(new PhabricatorObjectQuery())
        ->setViewer($viewer)
        ->withNames(array($from))
        ->executeOne();
      if (!$target) {
        throw new PhutilArgumentUsageException(
          pht(
            'Target "%s" is not a valid target to revoke credentials from. '.
            'Usually, revoke from "@username".',
            $from));
      }
    }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:128 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/9983ee33f3ffd7bc. Report an issue: GitHub.