Wondering if anyone knows why some Drush commands (with file parameters) only run from the docroot and won't run from the project/composer root?
Commands such as drush sql-query
and drush locale-import
are among these.
For example, with standard Drupal folder structure:
/ (composer root)
- composer.json
- vendor
- translations
- translations.fr.po
- web (docroot)
running from composer root:
vendor/bin/drush locale-import fr translations/translations.fr.po
gives file not found error. Even using ./translations/translations.fr.po
gives same error
but going to docroot and running:
../vendor/bin/drush ../translations/translation.fr.po
works fine.
Our deploy scripts always run composer
, drush
and other commands from the composer root folder. So a bit of a pain to have to cd /web
and then cd ..
for these couple "special" Drush commands. Guessing there must be something I am doing wrong.
vendor/bin/drush locale-import fr ../translations/translations.fr.po
from the project root work?