Commit 0c4d648d authored by omega8cc's avatar omega8cc Committed by anarcat

Issue #1250068 - Add support for Drush 4.5

parent 5b3bcbb0
......@@ -40,7 +40,8 @@ function drush_provision_drupal_provision_clone($new_uri, $platform = null) {
$options = d()->options;
$options['uri'] = ltrim($new_uri, '@');
$options['name'] = $new_uri;
$hash_name = drush_get_option('#name') ? '#name' : 'name';
$options[$hash_name] = $new_uri;
$options['platform'] = (isset($platform)) ? $platform : $options['platform'];
$options['root'] = d($options['platform'])->root;
$options['aliases'] = array();
......
......@@ -73,7 +73,8 @@ function drush_provision_drupal_provision_migrate($platform, $new_uri = null) {
if (!is_null($new_uri) && ($new_uri != d()->uri)) {
$options = d()->options;
$options['uri'] = ltrim($new_uri, '@');
$options['name'] = $new_uri;
$hash_name = drush_get_option('#name') ? '#name' : 'name';
$options[$hash_name] = $new_uri;
}
$options['platform'] = $platform;
$options['root'] = d($platform)->root;
......
......@@ -57,7 +57,8 @@ include_once('provision.inc');
* @see provision_load_critical()
*/
function provision_drush_init() {
d(drush_get_option('name', '@self', 'alias'), TRUE);
$hash_name = drush_get_option('#name') ? '#name' : 'name';
d(drush_get_option($hash_name, '@self', 'alias'), TRUE);
$load = sys_getloadavg();
if (provision_load_critical($load)) {
drush_set_error('PROVISION_OVERLOAD', dt("load on system too heavy (@load), aborting", array('@load' => join(" ", $load))));
......
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