If drush_webform_purge() does not find any submissions to purge, it calls drush_set_error():

https://cgit.drupalcode.org/webform/tree/src/Commands/WebformCliService....

Not finding any submissions to purge is normal and acceptable. Setting an error here causes that error to bubble up during automated processes, and for example can cause CI builds to fail.

drush_print() might be more appropriate here.

Comments

timcosgrove created an issue. See original summary.

timcosgrove’s picture

Patch attached, if this is the right approach.

jrockowitz’s picture

Status: Active » Fixed

Thanks for the patch.

timcosgrove’s picture

Patch was bad. Corrected attached. Though I see you corrected it already; sorry for the bad code.

jrockowitz’s picture

@timcosgrove LOL. Yep, I trusted you and just committed the patch.

No sweat it happens.

Status: Fixed » Closed (fixed)

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