{"record":{"id":"011a6db1175b5cef","repo":"phacility/phabricator","slug":"specify-either-a-list-of-objects-to-affect-or-a","errorCode":null,"errorMessage":"Specify either a list of objects to affect or \"--all\", but not both.","messagePattern":"Specify either a list of objects to affect or \"--all\", but not both\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/audit/management/PhabricatorAuditManagementWorkflow.php","lineNumber":33,"sourceCode":"        'wildcard' => true,\n        'help' => pht('Update named commits and repositories.'),\n      ),\n    );\n  }\n\n  protected function loadCommitsWithConstraints(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $all = $args->getArg('all');\n    $names = $args->getArg('objects');\n\n    if (!$names && !$all) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify \"--all\" to affect everything, or a list of specific '.\n          'commits or repositories to affect.'));\n    } else if ($names && $all) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify either a list of objects to affect or \"--all\", but not '.\n          'both.'));\n    }\n\n    if ($all) {\n      $objects = new LiskMigrationIterator(new PhabricatorRepository());\n    } else {\n      $query = id(new PhabricatorObjectQuery())\n        ->setViewer($viewer)\n        ->withNames($names);\n\n      $query->execute();\n\n      $objects = array();\n\n      $results = $query->getNamedResults();\n      foreach ($names as $name) {","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php#L15-L51","documentation":"Error \"Specify either a list of objects to affect or \"--all\", but not both.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/audit/management/PhabricatorAuditManagementWorkflow.php:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}