Skip to content

Conversation

@arithmetric
Copy link
Collaborator

Ensure that Behat is run with the process's environment variables in addition to ones added by the Behat task.

@peterschuelke reported an issue where Behat failed to run through Grunt Drupal Tasks with the command: /bin/sh -c vendor/bin/behat -c ./test/behat.yml --tags ~@wip ././test/features/dashboard.feature but could be run manually with: vendor/bin/behat -c ./test/behat.yml --tags ~@wip ././test/features/dashboard.feature. Another environment had an issue running Behat where it reported php not being found.

After applying this patch, Behat was able to run through Grunt Drupal Tasks using the 'sh -c' shell wrapper.

@grayside
Copy link
Contributor

Looks good, however is it worth considering whether this should be a bit of "magic" configuration as invented for https://github.com/phase2/grunt-drupal-tasks/pull/166/files. The main difference is you need to be more explicit about env vars of interest, but as a side benefit it provides a mechanism for these values to be set programmatically in project Gruntfile.js.

@arithmetric
Copy link
Collaborator Author

@grayside That may be worth considering in a future version. Unless there are reasons to think this causes unexpected and bad consequences, we should get this in as a bug fix/usability enhancement and roll a patch release.

grayside added a commit that referenced this pull request Jun 23, 2015
Configure Behat to run with access to all environment variables.
@grayside grayside merged commit b53dad5 into master Jun 23, 2015
@arithmetric arithmetric deleted the task/behat-add-env-vars branch August 7, 2015 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants