diff --git a/drush/config_devel.drush.inc b/drush/config_devel.drush.inc index 7759575..1dfc23f 100644 --- a/drush/config_devel.drush.inc +++ b/drush/config_devel.drush.inc @@ -154,13 +154,16 @@ function drush_config_devel_import_one($path) { * The module, theme or install profile we're exporting. * @param string $directory * The directory we're exporting to. + * + * @return bool + * TRUE when the configuration was successfully exported. FALSE otherwise. */ function drush_config_devel_process_config($config_list, $type, $extension, $directory) { $config_path = drupal_get_path($type, $extension) . "/$directory"; // Ensure the directory always exists. if (!file_exists($config_path) && !\Drupal::service('file_system')->mkdir($config_path, NULL, TRUE)) { - drush_log(sprintf('The %s directory could not be created', $config_path)); + drush_set_error('CONFIG_DEVEL_DIRECTORY_NOT_CREATED', sprintf('The %s directory could not be created', $config_path)); return FALSE; } @@ -170,6 +173,8 @@ function drush_config_devel_process_config($config_list, $type, $extension, $dir \Drupal::service('config_devel.writeback_subscriber')->writeBackConfig($config, $file_names); } + + return TRUE; } /**