Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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');
Comment | File | Size | Author |
---|---|---|---|
#2 | xmlsitemap-output-warning-2675482-d7.patch | 791 bytes | Jean Kemparski Ribeiro |
|
Comments
Comment #2
Jean Kemparski Ribeiro CreditAttribution: Jean Kemparski Ribeiro commentedComment #3
jribeiro CreditAttribution: jribeiro at CI&T for Pfizer, Inc. commented