Commit 3931924e authored by pifagor's avatar pifagor Committed by pifagor

Issue #2675490 by pifagor, jribeiro, alex_optim, Chris Matthews, Dave Reid:...

Issue #2675490 by pifagor, jribeiro, alex_optim, Chris Matthews, Dave Reid: [drush] xmlsitemap-rebuild should output WARNING instead of ERROR when there are no links rebuildable
parent a597b2a8
......@@ -76,7 +76,7 @@ class XmlSitemapCommands extends DrushCommands {
// Build a list of rebuildable link types.
$rebuild_types = xmlsitemap_get_rebuildable_link_types();
if (empty($rebuild_types)) {
throw new \Exception("No link types are rebuildable.");
drush_log(dt('No link types are rebuildable.'), 'warning');
}
$batch = xmlsitemap_rebuild_batch($rebuild_types, TRUE);
......
......@@ -48,7 +48,7 @@ function drush_xmlsitemap_rebuild() {
// Build a list of rebuildable link types.
$rebuild_types = xmlsitemap_get_rebuildable_link_types();
if (empty($rebuild_types)) {
return drush_set_error("No link types are rebuildable.");
return drush_log(dt('No link types are rebuildable.'), 'warning');
}
$batch = xmlsitemap_rebuild_batch($rebuild_types, TRUE);
......
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