runSync static method

ProcessResult runSync(
  1. String executable,
  2. List<String> arguments, {
  3. String? workingDirectory,
  4. Map<String, String>? environment,
  5. bool includeParentEnvironment = true,
  6. bool runInShell = false,
  7. Encoding? stdoutEncoding = systemEncoding,
  8. Encoding? stderrEncoding = systemEncoding,
})

Starts a process and runs it to completion. This is a synchronous call and will block until the child process terminates.

The arguments are the same as for Process.run.

Returns a ProcessResult with the result of running the process, i.e., exit code, standard out and standard in.

Implementation

external static ProcessResult runSync(
  String executable,
  List<String> arguments, {
  String? workingDirectory,
  Map<String, String>? environment,
  bool includeParentEnvironment = true,
  bool runInShell = false,
  Encoding? stdoutEncoding = systemEncoding,
  Encoding? stderrEncoding = systemEncoding,
});