Commit a576afbc authored by Adrian Rossouw's avatar Adrian Rossouw

Introduce a simple wrapper around drush_backend_invoke_args to run commands...

Introduce a simple wrapper around drush_backend_invoke_args to run commands against specific objects.

This also handles resetting the --root and --uri so that it doesnt try to use the current environment
for the options.
parent d2b98045
......@@ -239,3 +239,10 @@ function provision_password($length = 10) {
function _scrub_object($input) {
return json_decode(json_encode($input), TRUE);
}
/**
* Execute a command against a specific context object.
*/
function provision_backend_invoke($target, $command, $arguments = array(), $options = array(), $mode = 'GET') {
return drush_backend_invoke_args('@' . ltrim($target, '@') . ' ' . $command, $arguments, $options + array('root' => null, 'uri' => null), $mode);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment