{"record":{"id":"3644e38a1c119eed","repo":"phacility/phabricator","slug":"specify-a-commit-to-look-up-with-s","errorCode":null,"errorMessage":"Specify a commit to look up with `%s`.","messagePattern":"Specify a commit to look up with `(.+?)`\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"info","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php","lineNumber":31,"sourceCode":"        array(\n          array(\n            'name'    => 'commit',\n            'param'   => 'commit',\n            'help'    => pht('Specify a commit to look up.'),\n          ),\n          array(\n            'name'    => 'path',\n            'param'   => 'path',\n            'help'    => pht('Specify a path to look up.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n\n    $commit_name = $args->getArg('commit');\n    if ($commit_name === null) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify a commit to look up with `%s`.',\n          '--commit'));\n    }\n    $commit = $this->loadNamedCommit($commit_name);\n\n    $path_name = $args->getArg('path');\n    if ($path_name === null) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify a path to look up with `%s`.',\n          '--path'));\n    }\n\n    $path_map = id(new DiffusionPathIDQuery(array($path_name)))\n      ->loadPathIDs();\n    if (empty($path_map[$path_name])) {\n      throw new PhutilArgumentUsageException(","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php#L13-L49","documentation":"Usage error from the 'bin/repository cache' management workflow: the command inspects the last-modified graph cache for a commit and path pair, and --commit was not supplied. PhutilArgumentUsageException signals malformed command-line invocation; the command aborts before doing any work.","triggerScenarios":"Running 'bin/repository cache' without arguments, or with only --path supplied; the null check on getArg('commit') fails before anything runs.","commonSituations":"Admin exploring cache internals and forgetting the required flag; scripts written against a different version of the workflow with changed flags.","solutions":["Re-run with --commit <identifier>, e.g. 'bin/repository cache --commit abc123 --path /src'","Run 'bin/repository cache --help' to confirm current flag names before scripting it"],"exampleFix":"# before\nbin/repository cache --path /src\n\n# after\nbin/repository cache --commit abc123ef --path /src","handlingStrategy":"validation","validationCode":"// Wrap CLI invocation: check args before running\nif (!isset($opts['commit'])) {\n  fwrite(STDERR, \"usage: bin/repository cache --commit <sha> --path <path>\\n\");\n  exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read --help before invoking bin/repository subcommands","Script CLI calls with --commit and --path always supplied together"],"tags":["phabricator","cli","usage-error","cache"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}