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.

Comments

clemens.tolboom’s picture

Status: Active » Needs review
StatusFileSize
new826 bytes

The attached patch needs review

febbraro’s picture

Status: Needs review » Needs work

The drush command also needs the docs updated so that "drush help feature-export" and "drush feature-export --help" display the proper options/docs.

raines37’s picture

Category: bug » task
StatusFileSize
new2.83 KB

Here'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?

raines37’s picture

StatusFileSize
new2.83 KB

Here's another try at submitting the previous patch. Last upload failed mysteriously.

febbraro’s picture

Status: Needs work » Patch (to be ported)

Committed to 7.x thanks. http://drupalcode.org/project/features.git/commit/cb51f54

Possible inclusion in 6.x?

drzraf’s picture

Status: Patch (to be ported) » Active
StatusFileSize
new663 bytes

don't know if the drush API changed recently but the attached patch is now needed.

drzraf’s picture

StatusFileSize
new952 bytes

and why not even this one so that if you specify a non-existent destination it will be created.

drzraf’s picture

#1363284: Drush --force option is declared wrong fixed it (should have found it).
interest in getting the recursive mkdir commited ?

febbraro’s picture

Status: Active » Patch (to be ported)

If you want the recursive mkdir, can you create a new issue and add a patch specifically to do just that?

febbraro’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
drzraf’s picture

StatusFileSize
new2.76 KB

rebased 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));

  • febbraro committed cb51f54 on 8.x-3.x
    Issue #1191558 by clemens.tolboom, Raines37: Allow for drush --...