function drush_core_site_install_validate

8.0.x site_install.drush.inc drush_core_site_install_validate()
6.x site_install.drush.inc drush_core_site_install_validate()
7.x site_install.drush.inc drush_core_site_install_validate()
4.x site_install.drush.inc drush_core_site_install_validate()
5.x site_install.drush.inc drush_core_site_install_validate()
master site_install.drush.inc drush_core_site_install_validate()

Command validate.

File

commands/core/site_install.drush.inc, line 92

Code

function drush_core_site_install_validate() {
  if ($sites_subdir = drush_get_option('sites-subdir')) {
    $lower = strtolower($sites_subdir);
    if ($sites_subdir != $lower) {
      drush_log(dt('Only lowercase sites-subdir are valid. Switching to !lower.', array('!lower' => $lower)), LogLevel::WARNING);
      drush_set_option('sites-subdir', $lower);
    }
    // Make sure that we will bootstrap to the 'sites-subdir' site.
    drush_set_context('DRUSH_SELECTED_URI', 'http://' . $sites_subdir);
  }

  if ($config = drush_get_option('config-dir')) {
    if (!file_exists($config)) {
      return drush_set_error('config_import_target', 'The config source directory does not exist.');
    }
    if (!is_dir($config)) {
      return drush_set_error('config_import_target', 'The config source is not a directory.');
    }
  }
}