diff --git a/deleted_modules.drush.inc b/deleted_modules.drush.inc index 71f3a59..eadeb33 100644 --- a/deleted_modules.drush.inc +++ b/deleted_modules.drush.inc @@ -113,11 +113,14 @@ function drush_deleted_modules_cleanup() { } drush_log("Module {$name} was properly uninstalled and should be now safe to remove from the file system.", 'success'); - drush_print(dt('Delete modules can remove the previously downloaded files from the site as it belongs to a properly uninstalled module!')); - $path = drush_extension_get_path($module); + $path = drush_extension_get_path($module); if (drush_confirm(dt("Do you want to remove the uninstalled {$name} module from {$path}?"))) { - drush_delete_dir($path, TRUE); - drush_log("Module {$name} and its files from {$path} was properly removed from the file system.", 'success'); + if (drush_delete_dir($path, TRUE)) { + drush_log("Module {$name} and its files from {$path} was properly removed from the file system.", 'success'); + } + else { + return drush_set_error("Unable to remove {$path} from the filesystem."); + } } } return TRUE;