run method

Progress run({
  1. required List<String> args,
  2. String? workingDirectory,
  3. Progress? progress,
  4. bool detached = false,
  5. bool terminal = false,
  6. bool nothrow = false,
})

Run the dart exe with arguments.

Implementation

Progress run({
  required List<String> args,
  String? workingDirectory,
  Progress? progress,
  bool detached = false,
  bool terminal = false,
  bool nothrow = false,
}) {
  progress ??= Progress.print();

  if (pathToDartExe == null) {
    throw DCliException(
      "Unable to run 'dart' as the dart exe is not on your path",
    );
  }
  startFromArgs(
    pathToDartExe!,
    args,
    nothrow: nothrow,
    detached: detached,
    terminal: terminal,
    progress: progress,
    workingDirectory: workingDirectory,
    extensionSearch: false,
  );
  verbose(() => 'dart ${args.toList().join(' ')} finished.');

  return progress;
}