If you have a feature called my_feature in sites/all/modules/custom/my_feature, regardless of where you are in the directory, drush fe my_feature node:some_new_type, it creates sites/all/modules/my_feature.

Comments

mpotter’s picture

Priority: Major » Normal
Issue tags: -D7 stable release blocker

Removing tag since v1.0 was already released and this was not a critical issue. A patch to fix this issue would be welcome.

tim.plunkett’s picture

Priority: Normal » Major

Actually, this is one of the biggest pain points of Features. Obviously the tag is obsolete, but this is *definitely* major.

mpotter’s picture

That's odd. You are talking about adding new stuff to an existing feature, right? Since "drush fu" is able to determine the existing path and update it in place I'm surprised "drush fe" can't also update it in place.

If this is only when creating a new feature, then it's hardly "major" since a simple "mv" command is all you need afterwards. But if this is happening when adding to an existing feature then I can see where it would be a pain.

Still, it only impacts people specifically using the "drush fe" command, which still hardly makes it "major" for the vast majority who are using the Features UI. But I won't quibble over the priority if somebody will post a patch to be reviewed.

tim.plunkett’s picture

Priority: Major » Normal

It's not a simple mv, since it doesn't always hold onto changes made to the .module.

fxarte’s picture

Yes, I've seen this behavior as well, also in 6.x, my reason commenting now, the feature already exists and when adding a new component, it some times correctly tells you that a feature with that name already exists and asks if you would like to overwrite it.
In other occasions it just creates a new feature in sites/all/modules.
I have noticed both cases on the same project and same feature, and haven't been able to isolate a possible cause.

UPDATE:
I'm sorry, I was confusing/mixing with "drush fu", as this seems to be the behavior on 6.x (always assumes user wants to create a new module).
Although on 7.x it checks if feature is present and enabled, see features.drush.inc, line 422 :

::
    if (($feature = features_load_feature($module, TRUE)) && module_exists($module)) {
::