configure method
Finalizer method to configure the check step.
Searches for the specified programs and executes onSuccess or onFailure based on the result.
Implementation
@override
Step configure() => Runnable(name: name, (context) {
if (programs.isEmpty) {
return;
}
final List<String> notAvailable = search(
programs,
directories,
searchCanStartProcesses,
);
if (notAvailable.isEmpty) {
if (onSuccess != null) {
onSuccess!(context);
}
return;
}
if (onFailure != null) {
onFailure!(context, notAvailable);
}
});