phacility/phabricator · error · PhutilArgumentUsageException

Specify a list of repositories or "--all-repositories", but…

Error message

Specify a list of repositories or "--all-repositories", but not both.

What it means

Usage guard in the repository 'thaw' CLI workflow: fires when both repository names and --all-repositories were supplied. The two flags define contradictory scopes for unfreezing repository cluster replicas, so the argument validation aborts before any device or service lookup.

Solutions

  1. Pass either an explicit repository list or --all-repositories, not both.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:117 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/d57e4ff09cf10d8a. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:117

      }

      $interfaces = id(new AlmanacInterfaceQuery())
        ->setViewer($viewer)
        ->withPHIDs(mpull($bindings, 'getInterfacePHID'))
        ->execute();

      $device_phids = mpull($interfaces, 'getDevicePHID');

      $devices = id(new AlmanacDeviceQuery())
        ->setViewer($viewer)
        ->withPHIDs($device_phids)
        ->execute();
    }

    $repository_names = $args->getArg('repositories');
    $all_repositories = $args->getArg('all-repositories');
    if ($repository_names && $all_repositories) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify a list of repositories or "--all-repositories", '.
          'but not both.'));
    } else if (!$repository_names && !$all_repositories) {
      throw new PhutilArgumentUsageException(
        pht(
          'Select repositories to affect by providing a list of repositories '.
          'or using the "--all-repositories" flag.'));
    }

    if ($repository_names) {
      $repositories = $this->loadRepositories($args, 'repositories');
      if (!$repositories) {
        throw new PhutilArgumentUsageException(
          pht('Specify one or more repositories to thaw.'));
      }
    } else {
      $repositories = array();

View on GitHub (pinned to 5720a38cfe)