run method

Future<ProcessResult> run(
  1. String executable,
  2. List<String> arguments, {
  3. String? workingDirectory,
  4. Map<String, String>? environment,
  5. bool includeParentEnvironment = true,
})

Runs the process to completion and returns the result.

Takes an executable and an argument list. Does NOT run in a shell to avoid injection and ensure arguments containing spaces are passed correctly.

Implementation

Future<ProcessResult> run(
  String executable,
  List<String> arguments, {
  String? workingDirectory,
  Map<String, String>? environment,
  bool includeParentEnvironment = true,
}) {
  return Process.run(
    executable,
    arguments,
    workingDirectory: workingDirectory,
    environment: environment,
    includeParentEnvironment: includeParentEnvironment,
    runInShell: false,
  );
}