{"record":{"id":"0e53382580ba1f16","repo":"phacility/phabricator","slug":"specify-a-configuration-key-to-delete","errorCode":null,"errorMessage":"Specify a configuration key to delete.","messagePattern":"Specify a configuration key to delete\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php","lineNumber":31,"sourceCode":"          array(\n            'name'  => 'database',\n            'help'  => pht(\n              'Delete configuration in the database instead of '.\n              'in local configuration.'),\n          ),\n          array(\n            'name'      => 'args',\n            'wildcard'  => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n\n    $argv = $args->getArg('args');\n    if (count($argv) == 0) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify a configuration key to delete.'));\n    }\n\n    $key = $argv[0];\n\n    if (count($argv) > 1) {\n      throw new PhutilArgumentUsageException(\n        pht('Too many arguments: expected one key.'));\n    }\n\n\n    $use_database = $args->getArg('database');\n    if ($use_database) {\n      $config = new PhabricatorConfigDatabaseSource('default');\n      $config_type = 'database';\n    } else {\n      $config = new PhabricatorConfigLocalSource();\n      $config_type = 'local';","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php#L13-L49","documentation":"Usage guard in the config delete CLI workflow: fires when the wildcard 'args' argument list is empty, meaning no configuration key was named on the command line. The workflow requires exactly one key to delete from local or database config.","triggerScenarios":"Thrown at src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php:31 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly one configuration key, e.g. bin/config delete example.key"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}