function _drush_verify_cli_arguments
| 6.x command.inc | _drush_verify_cli_arguments($command) |
| 5.x command.inc | _drush_verify_cli_arguments($command) |
Related topics
1 call to _drush_verify_cli_arguments()
- drush_dispatch in includes/
command.inc - 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…
File
- includes/
command.inc, line 593 - The drush command engine.
Code
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 = count($required_arg_count) > 1 ? dt('Missing required arguments') : dt('Missing required argument');
$required = implode("', '", array_keys($command['argument-description']));
return drush_set_error(dt("@missing: '@required'. See `drush help @command` for information on usage.", array('@missing' => $missing, '@required' => $required, '@command' => $command['command'])));
}
}
return TRUE;
}