backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

added civicrm-install to safe commands #194

Closed tabroughton closed 5 years ago

tabroughton commented 5 years ago

I have been having an issue with Civicrm drush command and backdrop mainly because of the need to whitelist safe commands and/or have an enabled module with the drush commands in a modules dir.

This would normally be fine and civicrm does have a drush dir within it's module, the only issue is is that the drush commands are not available unless the module has been enabled first. The civicrm-install process needs to run before the module is enabled, enabling it beforehand breaks the site.

I've looked at options to work around this and they're either hacky or sledgehammers. The most elegant and straightforward way is to include civicrm-install command into the safe commands array in this project. I've made a note of some of the options here https://github.com/polydigital/backdrop-civicrm-docker/issues/17

It wouldn't impact other use-cases with/without civicrm and the civicrm-install has been well tested (and fixed) now by me. here: https://github.com/civicrm/civicrm-backdrop/blob/1.x-master/drush/civicrm.drush.inc

I hope this can be merged in even though civicrm isn't anything to do with backdrop core of course - it would be useful for others too I'm sure.