In my drush alias, i defined the following:

// Drupal site settings
$aliases['local'] = array(
  'root' => '/var/www/xxxxx',
  'uri' => 'rb',
  'env' => 'local',
  'db_url' => 'mysql://root:@127.0.0.1/dev',
  'path-aliases' => array(
    '%dump' => '/tmp/local.rb.sql',
    '%files' => '/var/www/xxxx/sites/default/files',
  ),
  'target-command-specific' => array(
    'sql-sync' => array(
      'disable' => array('boost', 'memcache'),
      'enable'  => array('stage_file_proxy'),
    ),
  ),
);

However, when i perform a sql-sync it enables stage_file_proxy first. thus causing a bunch of errors php fatal errors:

PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/parallels/workspace/xxx/sites/all/modules/views/views.install on line 70

Is there any way to force drush to disable those modules first and then enable stage_file_proxy?

Comments

greg.1.anderson’s picture

You are using sync_enable.drush.inc, which is just sample code. If you want it to disable before enabling, just reverse the order of the first two blocks of code in the function to call pm-disable first.

This change would probably be generally useful to make in the example function as well.

chrisjlee’s picture

Yes i'm using sync_enable.drush.inc in the example code.

That makes sense. I'll give that a try. Thanks for your quick response greg as usual!

greg.1.anderson’s picture

Version: 7.x-5.x-dev » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to closed (duplicate).

Use our Github project for contributing code, or reporting bugs, or requesting features.