postRun method
Action to run after a task associated with this RunCondition has run, whether successfully or not.
This method will not be called if the Dartle cache has been disabled.
Implementation
@override
FutureOr<void> postRun(TaskResult result) async {
if (verifyDeletions) {
final failedToDelete = await _collectNotDeleted().toList();
if (failedToDelete.isNotEmpty) {
final taskName = result.invocation.name;
throw DartleException(
message:
"task '$taskName' did not delete the following expected entities:\n"
'${failedToDelete.map((f) => ' * $f').join('\n')}');
}
}
}