Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The default (and only) behavior for drush feature-export
is the sites/all/modules directory.
Is should be possible to use the drush arg --destination to change that.
Comment | File | Size | Author |
---|---|---|---|
#11 | 1191558-D6.patch | 2.76 KB | drzraf |
#7 | 1191558-7.patch | 952 bytes | drzraf |
#6 | 1191558-6.patch | 663 bytes | drzraf |
#4 | feature-destination-1191558-2.patch | 2.83 KB | Raines37 |
#3 | feature-destination-1191558-2.patch | 2.83 KB | Raines37 |
Comments
Comment #1
clemens.tolboomThe attached patch needs review
Comment #2
febbraro CreditAttribution: febbraro commentedThe drush command also needs the docs updated so that "drush help feature-export" and "drush feature-export --help" display the proper options/docs.
Comment #3
Raines37 CreditAttribution: Raines37 commentedHere's a patch with the following additions/updates to the previous one in this thread.
* Removed extra trailing slash from default destination
* README.txt now documents the new option
* 'drush help fe' now displays the new option and provides some details
I tested and it works as intended, but I did notice a few unhappy side effects:
1. I was able to use '../' as an argument to write the feature outside of Drupal root.
2. Features will let you re-create a module of the same name in a different location without the usual warning of "Module appears to already exist in sites/all/modules/feature_user_perm_view Do you really want to continue? (y/n):"
Anybody think either of those two items are show-stoppers for getting this patch committed?
Comment #4
Raines37 CreditAttribution: Raines37 commentedHere's another try at submitting the previous patch. Last upload failed mysteriously.
Comment #5
febbraro CreditAttribution: febbraro commentedCommitted to 7.x thanks. http://drupalcode.org/project/features.git/commit/cb51f54
Possible inclusion in 6.x?
Comment #6
drzraf CreditAttribution: drzraf commenteddon't know if the drush API changed recently but the attached patch is now needed.
Comment #7
drzraf CreditAttribution: drzraf commentedand why not even this one so that if you specify a non-existent destination it will be created.
Comment #8
drzraf CreditAttribution: drzraf commented#1363284: Drush --force option is declared wrong fixed it (should have found it).
interest in getting the recursive mkdir commited ?
Comment #9
febbraro CreditAttribution: febbraro commentedIf you want the recursive mkdir, can you create a new issue and add a patch specifically to do just that?
Comment #10
febbraro CreditAttribution: febbraro commentedComment #11
drzraf CreditAttribution: drzraf commentedrebased for D6 (don't forget to fix other drush option too (double-dash): #1363284: Drush --force option is declared wrong )
please review and push.
please note: I fixed a warning by encapsulating $component into an array():
_drush_features_export($stub, array($component));