runCapped function

Future<ProcessResult> runCapped(
  1. ProcessRunner run,
  2. String executable,
  3. List<String> arguments, {
  4. required Duration timeout,
  5. String? phase,
})

Runs through the injected run, giving the default boundedRun this call's own timeout and phase.

Implementation

Future<ProcessResult> runCapped(
  ProcessRunner run,
  String executable,
  List<String> arguments, {
  required Duration timeout,
  String? phase,
}) =>
    identical(run, boundedRun)
        ? runBounded(executable, arguments, timeout: timeout, phase: phase)
        : run(executable, arguments);