How can I tell Drush in which folder should a module be copied?
-
16-10-2019 - |
Pergunta
Is there a way to make Drush download modules into a specified folder besides sites/all/modules (e.g. sites/all/contrib, sites/all/core)?
If this makes a difference, I am using Drush 4.4.
Solução
I've not tried it but apparently.
drush help dl
--destination Path to which the project will be copied. If you're providing a relative path, note it is relative to the drupal root (if bootstrapped).
Outras dicas
You can default this to, for example, sites/all/modules/contrib, in your .drush/drushrc.php file.
$command_specific['dl'] = array('destination' => 'sites/all/modules/contrib');
Also note that you won't be able to exclude the 'modules' part of the path, as Drupal uses this to scan for modules.
There are 6 places this file can live:
- Drupal site folder (e.g. sites/{default|example.com}/drushrc.php).
- Drupal /drush and sites/all/drush folders, or the /drush folder in the directory above the Drupal root.
- In any location, as specified by the --config (-c) option.
- User's .drush folder (i.e. ~/.drush/drushrc.php).
- System wide configuration folder (e.g. /etc/drush/drushrc.php).
- Drush installation folder.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a drupal.stackexchange