function _drush_verify_cli_arguments

8.0.x _drush_verify_cli_arguments($command)
6.x _drush_verify_cli_arguments($command)
7.x _drush_verify_cli_arguments($command)
5.x _drush_verify_cli_arguments($command)
master _drush_verify_cli_arguments($command)

Related topics

1 call to _drush_verify_cli_arguments()
drush_dispatch in includes/
Given a command record, dispatch it as if it were the original command. Executes in the currently bootstrapped site using the current option contexts. Note that drush_dispatch will not bootstrap any further than the current command has already…


includes/, line 617
The drush command engine.


function _drush_verify_cli_arguments($command) {
  // Check to see if all of the required arguments
  // are specified.
  if ($command['required-arguments']) {
    $required_arg_count = $command['required-arguments'];
    if ($required_arg_count === TRUE) {
      $required_arg_count = count($command['argument-description']);

    if (count($command['arguments']) < $required_arg_count) {
      $missing = $required_arg_count > 1 ? dt('Missing required arguments') : dt('Missing required argument');
      $required = array_slice(array_keys($command['argument-description']), 0, $required_arg_count);

      return drush_set_error(dt("@missing: @required.  See `drush help @command` for information on usage.", array(
        '@missing' => $missing,
        '@required' => implode(", ", $required),
        '@command' => $command['command'],
  return TRUE;