Commit 708fa44d authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Small fix to how the site configuration is saved and also preload the $_SERVER...

Small fix to how the site configuration is saved and also preload the $_SERVER variable during install task
parent 0ced18e2
......@@ -39,8 +39,14 @@ function drush_provision_drupal_pre_provision_install($url) {
*/
function drush_provision_drupal_provision_install($url) {
// Requires at least the database settings to complete.
_provision_drupal_create_settings_file($url);
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
$fields = array('db_type', 'db_host', 'db_user', 'db_passwd', 'db_name');
foreach ($fields as $key) {
$_SERVER[$key] = drush_get_option($key, null, 'site');
}
_provision_drupal_create_settings_file($url);
drush_include_engine('drupal', 'install');
drush_set_option('installed', TRUE, 'site');
_provision_drupal_maintain_aliases($url);
......
......@@ -81,7 +81,7 @@ function provision_load_site_data($url) {
*/
function provision_save_site_data() {
$context = 'site';
drush_save_config($site);
drush_save_config($context);
if (!drush_get_error()) {
// append the db settings in the _SERVER variable so normal drush commands can still read it.
......
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