function drush_config_import_validate

8.0.x config.drush.inc drush_config_import_validate()
7.x config.drush.inc drush_config_import_validate()
master config.drush.inc drush_config_import_validate()

File

commands/core/config.drush.inc, line 577
Provides Configuration Management commands.

Code

function drush_config_import_validate() {
  drush_include_engine('drupal', 'environment');
  if (drush_get_option('partial') && !drush_module_exists('config')) {
    return drush_set_error('config_import_partial', 'Enable the config module in order to use the --partial option.');
  }

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