There seems to be an error in the priority between the commandline and drushrc, probably related to an error in the array_merge() call here:
$args['options'] = array_merge($args['options'], $options); # Sets all the default options for drush
$options is the value inherited from drushrc, $args['options'] is the commandline.
The php manual says: If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. ... about array_merge().
So that should read:
$args['options'] = array_merge($options, $args['options']); # Sets all the default options for drush
Patch (trivial) attached.
| Comment | File | Size | Author |
|---|---|---|---|
| drush.patch | 463 bytes | anarcat |
Comments
Comment #1
vingborg commentedThat't definitely better aligned to how commandline tools usually works. +1 for this change.
I'll work that into the upcoming drush 2 branch.
Comment #2
adrian commentedI wrote the original patch for this, and I can confirm that this is not what I intended (there is an $override variable in drushrc that is provided for precisely this reason).
I will commit the patch later today to head, drupal-5 and drupal-6--1 branches
Comment #3
adrian commentedCommitted to d5, d6 and head branches.
Thanks anarcat.
http://drupal.org/cvs?commit=155554 - DRUPAL-5
http://drupal.org/cvs?commit=155555 - DRUPAL-6-1
http://drupal.org/cvs?commit=155556 - HEAD
btw. we need this fix to be rolled out in an official release before we can make our next release of aegir.
I really don't expect people to run -dev branches of modules on production servers =P
Comment #4
moshe weitzman commentedI have rolled new releases for both D5 and D6