This code is wrong:

    if ((isset($options)) && (array_key_exists('site-aliases', $options))) {
      $cache =& drush_get_context('drush'); // <-- GETS A REFERENCE TO THE DRUSH CONTEXT
      if (array_key_exists('site-aliases', $cache)) {
        $cache['site-aliases'] = array_merge($cache['site-aliases'], $options['site-aliases']);
      }
      else {
        $cache['site-aliases'] = $options['site-aliases'];
      }
      unset($options['site-aliases']);
    }

    drush_set_context($context, $options); // <-- IF CONTEXT IS "drush", THEN WE OVERWRITE THE CHANGE ABOVE

The easiest fix is to just move the site aliases to the 'alias' context, which is never set in by drush_load_config().

CommentFileSizeAuthor
alias-cache.patch886 bytesgreg.1.anderson

Comments

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.