phacility/phabricator · error · PhutilArgumentUsageException
Specify which files to operate on, or use "--all" to…
Error message
Specify which files to operate on, or use "--all" to operate on all files.
What it means
Iterator construction guard in the shared files workflow base class: neither --all nor any file selector (positional file names or --from-engine) was supplied, so the command has an empty file set and refuses to proceed.
Solutions
- Name specific files (e.g. F123) as arguments
- Use --from-engine <engine> to select files stored in a given engine
- Use --all to operate on every file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/files/management/PhabricatorFilesManagementWorkflow.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/d63e083cb9239b7c.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/files/management/PhabricatorFilesManagementWorkflow.php:35
'name' => 'from-engine',
'param' => 'storage-engine',
'help' => pht('Operate on files stored in a specified engine.'),
),
);
}
protected function buildIterator(PhutilArgumentParser $args) {
$viewer = $this->getViewer();
$is_all = $args->getArg('all');
$names = $args->getArg('names');
$from_engine = $args->getArg('from-engine');
$any_constraint = ($from_engine || $names);
if (!$is_all && !$any_constraint) {
throw new PhutilArgumentUsageException(
pht(
'Specify which files to operate on, or use "--all" to operate on '.
'all files.'));
}
if ($is_all && $any_constraint) {
throw new PhutilArgumentUsageException(
pht(
'You can not operate on all files with "--all" and also operate '.
'on a subset of files by naming them explicitly or using '.
'constraint flags like "--from-engine".'));
}
// If we're migrating specific named files, convert the names into IDs
// first.
$ids = null;
if ($names) {
$files = $this->loadFilesWithNames($names);View on GitHub (pinned to 5720a38cfe)