runReleaseProcess method

Future<ProcessResult?> runReleaseProcess(
  1. String executable,
  2. List<String> arguments, {
  3. String? workingDirectory,
  4. Map<String, String>? environment,
})

Runs a Process using an executable inside the current release path.

See Process.run.

Implementation

Future<ProcessResult?> runReleaseProcess(
    String executable, List<String> arguments,
    {String? workingDirectory, Map<String, String>? environment}) async {
  var executablePath = await currentReleaseFilePath(executable);
  if (executablePath == null) return null;

  workingDirectory ??= await currentReleasePath;

  return Process.run(executablePath, arguments,
      workingDirectory: workingDirectory, environment: environment);
}