Commit 602ef3fc authored by Adrian Rossouw's avatar Adrian Rossouw

Only create the local include_path when verifying the local server, and only...

Only create the local include_path when verifying the local server, and only synch it when verifying a remote server.
parent 73235a80
......@@ -23,18 +23,22 @@ function drush_provision_drupal_provision_verify_validate() {
*/
function drush_provision_drupal_provision_verify() {
if (d()->type === 'server') {
provision_file()->create_dir(d()->config_path, dt('Provision configuration'), 0711);
provision_file()->create_dir(d()->include_path, dt('Provision PHP configuration'), 0711);
if (!provision_file()->exists(d()->include_path . '/global.inc')->succeed('Global configuration file exists')->status()) {
// Create an empty global.inc so the include doesn't fail with
// open_basedir restrictions
$config = new provisionConfig_global_settings(d()->name);
$config->write();
}
d()->service('http')->sync(d()->include_path);
provision_file()->create_dir(d()->config_path, dt('Provision configuration'), 0711);
if (d()->name == '@server_localhost') {
provision_file()->create_dir(d()->backup_path, dt('Backup'), 0700);
provision_file()->create_dir(d()->include_path, dt('Provision PHP configuration'), 0711);
if (!provision_file()->exists(d()->include_path . '/global.inc')->succeed('Global configuration file exists')->status()) {
// Create an empty global.inc so the include doesn't fail with
// open_basedir restrictions
$config = new provisionConfig_global_settings(d()->name);
$config->write();
}
}
else {
if (provision_file()->exists(d()->include_path)) {
d()->service('http')->sync(d()->include_path);
}
}
}
elseif (d()->type === 'platform') {
......
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