runSimpleCliAdapter function
Runs a CLI adapter that accepts no options. Skips ArgParser construction
entirely; just intercepts --help/-h and otherwise calls execute with
the raw args (allowing the executor to inspect positional arguments).
Implementation
Future<int> runSimpleCliAdapter(
List<String> args,
Future<int> Function(List<String>) execute, {
String helpText = 'No options for this command.',
}) async {
if (args.contains('--help') || args.contains('-h')) {
stdout.writeln(helpText);
return 0;
}
return execute(args);
}