run method

String run (String package, { List<String> arguments, RunOptions runOptions, String script, String workingDirectory })

Run pub run on the given package and script.

If script is null it defaults to the same value as package.

Implementation

static String run(String package,
    {List<String> arguments,
    RunOptions runOptions,
    String script,
    String workingDirectory}) {
  runOptions = mergeWorkingDirectory(workingDirectory, runOptions);
  var scriptArg = script == null ? package : '$package:$script';
  List<String> args = ['run', scriptArg];
  if (arguments != null) args.addAll(arguments);
  return runlib.run(sdkBin('pub'), arguments: args, runOptions: runOptions);
}