run function

Future<void> run(
  1. String executableAndArgs,
  2. {Iterable<String>? args,
  3. String? name,
  4. String? workingDirectory,
  5. Map<String, String>? environment,
  6. bool includeParentEnvironment = true,
  7. bool runInShell = false}

Runs an executable for its side effects.

Returns a future that completes once the executable exits. Throws a ScriptException if the executable returns a non-zero exit code.

The executableAndArgs and args arguments are parsed as described in the README. The name is a human-readable identifier for this script that's used in debugging and error reporting, and defaults to the executable name. All other arguments are forwarded to Process.start.


Future<void> run(String executableAndArgs,
        {Iterable<String>? args,
        String? name,
        String? workingDirectory,
        Map<String, String>? environment,
        bool includeParentEnvironment = true,
        bool runInShell = false}) =>
            args: args,
            name: name,
            workingDirectory: workingDirectory,
            environment: environment,
            includeParentEnvironment: includeParentEnvironment,
            runInShell: runInShell)