Commit 8030d483 authored by Adrian Rossouw's avatar Adrian Rossouw

Remove the provision_shell_exec function, as the functionality was integrate...

Remove the provision_shell_exec function, as the functionality was integrate with drush_shell_exec, and we use that instead.
parent 4536b5b4
......@@ -64,7 +64,7 @@ function drush_provision_drupal_provision_backup() {
} else {
$command = "tar cpf %s .";
}
$result = provision_shell_exec($command, $backup_file);
$result = drush_shell_exec($command, $backup_file);
chdir($olddir);
if (!$result && !drush_get_option('force', false)) {
......
......@@ -316,7 +316,7 @@ class provisionFileSystem extends provisionChainedState {
// same here: some do not support -z
$command = 'gunzip -c %s | tar pxf -';
drush_log(dt('Running: %command in %target', array('%command' => sprintf($command, $path), '%target' => $target)));
$result = provision_shell_exec($command, $path);
$result = drush_shell_exec($command, $path);
chdir($oldcwd);
if ($result && is_writeable(dirname($target)) && is_readable(dirname($target)) && is_dir($target)) {
......
......@@ -152,23 +152,6 @@ function _provision_file_check_location($source, $directory = '') {
return $source;
}
/**
* Wrapper around drush_shell_exec to provide sprintf functionality with some more safety.
*
* @TODO: fix this so we can get error codes and the return values. drush_shell_exec is too
* limited
*/
function provision_shell_exec() {
$args = func_get_args();
//do not change the command itself, just the parameters.
for ($x = 1; $x < sizeof($args); $x++) {
$args[$x] = escapeshellcmd($args[$x]);
}
$command = call_user_func_array('sprintf', $args);
drush_log($command);
return drush_shell_exec($command);
}
/**
* Check whether a user is a member of a group.
......
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