-
Notifications
You must be signed in to change notification settings - Fork 36
Description
In drupal-7.sh and drupal-8.sh there is a command which run drush in the following way:
~/.composer/vendor/bin/drush.php
so I've the following error:
php -d sendmail_path=/bin/true /home/travis/.composer/vendor/bin/drush.php --yes site-install testing --db-url=mysql://root:@127.0.0.1/drupal
Could not open input file: /home/travis/.composer/vendor/bin/drush.php
Since I'd like to have my drush available globally as I'm using drupal_ti on top of my other CI tests, I've specified the following environment variable: COMPOSER_BIN_DIR=~/bin which automatically link drush binary into ~/bin which is available by default in Travis CI by just running drush (so I don't need to modify my PATH). This way is also described in drush docs.
So I wondering if there is a better way of running drush. It seems this syntax is only used in order to handle mails (php -d sendmail_path=$(which true)).
In my .travis.yml, my approach is a bit different (by installing mailcatcher, so there can be some tests related to received e-mails):
- gem install mailcatcher && mailcatcher -v
- echo 'sendmail_path="/usr/bin/env catchmail"' | tee -a "$(php --ini | grep "Loaded Configuration" | awk '{print $4}')"
In this case, we can install site in normal way, which is: drush --yes site-install, so we're not depending on any hardcoded paths and mails are handled by catchmail.