run static method

String run(
  1. String script, {
  2. List<String> arguments = const [],
  3. bool quiet = false,
  4. String? packageRoot,
  5. RunOptions? runOptions,
  6. String? workingDirectory,
  7. List<String> vmArgs = const [],
})

Run a dart script using runlib.run. Returns the stdout.

Implementation

static String run(
  String script, {
  List<String> arguments = const [],
  bool quiet = false,
  String? packageRoot,
  RunOptions? runOptions,
  String? workingDirectory,
  List<String> vmArgs = const [],
}) {
  runOptions = mergeWorkingDirectory(workingDirectory, runOptions);
  final args = _buildArgs(script, arguments, packageRoot, vmArgs);

  return runlib.run(dartVM.path,
      arguments: args, quiet: quiet, runOptions: runOptions);
}