Commit 2a40b5f0 authored by Adrian Rossouw's avatar Adrian Rossouw

The init and exit hooks were expecting to only be running on "provision *"...

The init and exit hooks were expecting to only be running on "provision *" commands, i modified them to run on "provision-*" commands instead.
parent af70361c
......@@ -12,7 +12,7 @@ include_once('provision.mysql.inc');
function provision_mysql_drush_init() {
$command = drush_get_command();
$command = explode(" ", $command['command']);
if ($command[0] == 'provision') {
if (preg_match("/^provision-/", $command[0])) {
drush_set_default('master_db', $GLOBALS['db_url']);
$master_db = drush_get_option('master_db');
$db = parse_url($master_db);
......
......@@ -50,7 +50,7 @@ function provision_drupal_drush_engine_drupal() {
function provision_drupal_drush_init($url = NULL) {
$command = drush_get_command();
$command = explode(" ", $command['command']);
if ($command[0] == 'provision') {
if (preg_match("/^provision-/", $command[0])) {
if ($url) {
drush_set_option('uri' , 'http://' . $url);
......@@ -76,7 +76,8 @@ function provision_drupal_drush_init($url = NULL) {
function provision_drupal_drush_exit($url = NULL) {
$command = drush_get_command();
$command = explode(" ", $command['command']);
if ($command[0] == 'provision') {
if (preg_match("/^provision-/", $command[0])) {
if (PROVISION_CONTEXT_SITE) {
if (drush_get_option('installed')) {
drush_set_option('site_url', drush_get_option('site_url'), 'site');
......
......@@ -20,7 +20,7 @@
function provision_apache_drush_init() {
$command = drush_get_command();
$command = explode(" ", $command['command']);
if ($command[0] == 'provision') {
if (preg_match("/^provision-/", $command[0])) {
// Set up defines for platform
$docroot = drush_get_option(array("r", "root"), $_SERVER['PWD']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment