2

Do you know if is there a way (by command argument, or in config) to ask drush not to remove IDE's configuration files and folder?

To be clear, Phpstorm create a .idea folder with project configuration in the root folder; when I run drush pm-update drupal, this folder is removed. Is there a way to ask drush to not delete this folder?

3
  • FWIW, I always have the base of my project one level up from Drupal root. This way, my .idea, .git, Gruntfile, etc, don't have to live in DOCROOT and I never accidentally deploy them.
    – mpdonadio
    Apr 28 '14 at 23:45
  • Yep, it could be a solution but how do you manage the cvs integration with phpstorm. The root of you repos is the drupal instance ? or the level up ?
    – Kgaut
    Apr 29 '14 at 7:02
  • All of my PHPStorm projects are in ~/Drupal, eg ~/Drupal/foo.com. That is where the .idea and .git (or .svn) directory is. ~/Drupal/foo.com/docroot has the actual site.
    – mpdonadio
    Apr 29 '14 at 19:11
3

Nope. Drush always does a full directory replacement when upgrading a module with pm-update. This insures that any files removed from the release do not remain on the disk after the update. Contributions to improve drush in this area would be appreciated.

As a workaround, if you have your .idea folder checked into git, then you could always use git checkout -- .idea after pm-update to get it back.

1
0

The same thing happened to me, then I remembered that drush restores the directory sites, so you could locate all your permanent files inside that folder. Another option is to recover them from the backup drush does when updating...

I hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.