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
Usage guard in the 'auth revoke' CLI workflow: fires when both --from and --everywhere were supplied, since the revoke target would be ambiguous. This is a mutually-exclusive-argument check on the parsed PhutilArgumentParser flags, not a runtime failure.
Solutions
- Choose either --from <target> or --everywhere, and drop the other flag
Defensive patterns
Strategy: validation
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.
Appendix: 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)