- Module A depends on module B
- I cd into sites/example.com and drush en module_a
- Module B (required by module_a) is not present
- Drush tells me "The following projects have unmet dependencies: module_a requires module_b.
Would you like to download them"
- If I say yes, drush attemps to download module_b into sites/all (failing if I don't have write access there), whereas if I cancel and drush dl module_b, drush downloads module_b into my current directory, sites/example.com.

It would seem logical for dependencies to be downloaded into whatever directory I'm currently in (or, perhaps, the directory of the module I wanted to enable in the first place), rather than always dl into sites/all

Cheers,

Albert.

Comments

greg.1.anderson’s picture

This came up on Stack Exchange today; while I have not tried to implement a fix for this, it seems that in addition to passing --destination on to pm-download, we'd also need to add a global --cwd Drush option (to override the current working directory) -- either that, or restore the old CWD before making the call out. This will catch the case where the user is implicitly selecting the destination by setting the cwd to the site configuration folder. Drush always sets the cwd to the Drupal root while it is running, because that is what Drupal code expects.

mojzis’s picture

the older issue on the same theme wasnt described so well so i guess i will close it ? #1126992: unmet dependencies downloads to sites/all

greg.1.anderson’s picture

Thanks for catching the dup. The old one was fine, but I didn't see or remember it when commenting on this one.

greg.1.anderson’s picture

Version: » 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

removed some superfluous text.