I've created an installation profile and all modules have been installed into profiles/[profilename]/modules.

However, if I try drush pm-download for a module in that directory, a fresh copy of that module gets put in sites/all/modules.

I get this is probably an intentional behaviour (Keep profile modules separate from added contrib modules by downloading new modules to sites/all), however, there really should be a toggle in site.drushrc.php that checks whether the module already exists in profiles and either aborts or tries to replace it if there is already a copy there.

Thoughts? I know it's sheer laziness that prevents me from checking whether that module is already in profiles, but I confused myself epically the other day when I was trying to frantically troubleshoot an issue and kept downloading duplicate modules to sites/all.

Comments

rancas’s picture

I had the same problem using Panoply distribution with pantheon cloud service. I downloaded a module using drush to update it to a more recent version. The module was actually downloaded into my sites/all/modules/contrib directory and when I push the code with git the remote pantheon installation used the old profile/modules/contrib version of the code.

sonicthoughts’s picture

I have several module duplicates with an install profile. Is this a bug or should we not use dl with profiles? If no bug, what is best practice?

greg.1.anderson’s picture

Version: 7.x-5.8 » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.

greg.1.anderson’s picture

Issue summary: View changes

clarified