Problem/Motivation

When run drush xmlsitemap-rebuild with no rebuildable link types, the drush command output an ERROR (stderr) No link types are rebuildable. [Error].

This kind of message make sense to be an simple WARNING, because there are no errors during the sitemap generation, just a message describing that there are no links to be rebuildable.

This error could interrupt the execution of some CI process (my case)

Proposed resolution

Change "drush_set_error" to "drush_log".

-    return drush_set_error(dt('No link types are rebuildable.'));
+    return drush_log(dt('No link types are rebuildable.'), 'warning');
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jribeiro created an issue. See original summary.

jribeiro’s picture

Chris Matthews’s picture

Status: Needs review » Reviewed & tested by the community

The 3 year old patch in #2 to xmlsitemap.drush.inc applied cleanly to the latest xmlsitemap 7.x-2.x-dev and is a valid and reasonable change.

pifagor’s picture

  • pifagor committed e1da3d9 on 7.x-2.x authored by jribeiro
    Issue #2675490 by jribeiro, Chris2, pifagor: [drush] xmlsitemap-rebuild...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Dave Reid’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Status: Closed (fixed) » Patch (to be ported)

Likely needs to be adjusted for 8.x-1.x as well.

pifagor’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.11 KB
pifagor’s picture

alex_optim’s picture

Good for me.

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed 3931924 on 8.x-1.x
    Issue #2675490 by pifagor, jribeiro, alex_optim, Chris Matthews, Dave...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.