phacility/phabricator · error · PhutilArgumentUsageException
Specify the configuration key you want to set.
Error message
Specify the configuration key you want to set.
What it means
Usage guard in the config set CLI workflow: fires when the wildcard args list is empty, so no configuration key was named. This is the first argument check before the workflow decides between --stdin and command-line value parsing.
Solutions
- Pass a key and value: bin/config set <key> <value>
- Or use --stdin to read the value from standard input
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:35 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/da4517b35d3d1dde.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:35
'help' => pht(
'Update configuration in the database instead of '.
'in local configuration.'),
),
array(
'name' => 'stdin',
'help' => pht('Read option value from stdin.'),
),
array(
'name' => 'args',
'wildcard' => true,
),
));
}
public function execute(PhutilArgumentParser $args) {
$argv = $args->getArg('args');
if (!$argv) {
throw new PhutilArgumentUsageException(
pht('Specify the configuration key you want to set.'));
}
$is_stdin = $args->getArg('stdin');
$key = $argv[0];
if ($is_stdin) {
if (count($argv) > 1) {
throw new PhutilArgumentUsageException(
pht(
'Too many arguments: expected only a configuration key when '.
'using "--stdin".'));
}
fprintf(STDERR, tsprintf("%s\n", pht('Reading value from stdin...')));
$value = file_get_contents('php://stdin');
} else {View on GitHub (pinned to 5720a38cfe)