run method

  1. @override
Future<List<ProcessResult>> run(
  1. String script, {
  2. ShellOnProcessCallback? onProcess,
})

Run one or multiple plain text command(s).

Commands can be split by line.

Commands can be on multiple line if ending with ^ or \.

Returns a list of executed command line results.

onProcess is called for each started process.

Implementation

@override
Future<List<ProcessResult>> run(
  String script, {
  ShellOnProcessCallback? onProcess,
}) async {
  var result = await runScript(
    script,
    options: ShellCommandRunOptions(onProcess: onProcess),
  );
  return result.processResults;
}