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.
It's a bad practice to include HTML in CLI output. It clutters results to the point of illegibility on occasion. However, since this same output ends up in our task logs, it can be very useful to use placeholders in dt() that will format strings for easier parsing.
Thankfully, Drush's logging capabilities provide us with a relatively simple way to get the best of both worlds, using a custom log callback.
Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#2 | provision-strip_html_from_cli_output-2730463-1.patch | 1.21 KB | ergonlogic |
Comments
Comment #2
ergonlogicThis appears to work nicely.
Comment #3
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions commented+1 for stripping this out.
However I'm still seeing html from my hosting-queued running with --debug after applying this patch.
Comment #4
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions commented