runPubOrFail method Null safety

  1. @protected
Future<ProcessResult> runPubOrFail(
  1. String cmd,
  2. List<String> arguments,
  3. {bool printStdOut = true,
  4. bool immediatePrint = true,
  5. bool prependWithPubGet = false}
)

Implementation

@protected
Future<ProcessResult> runPubOrFail(String cmd, List<String> arguments,
    {bool printStdOut = true,
    bool immediatePrint = true,
    bool prependWithPubGet = false}) async {
  assert(printStdOut || !immediatePrint,
      "You can't disable std output if immediatePrint enabled");
  return runOrFail(
      () => runPub(cmd, arguments,
          immediatePrintStd: immediatePrint && printStdOut,
          immediatePrintErr: false,
          prependWithPubGet: prependWithPubGet),
      printStdOut: !immediatePrint && printStdOut);
}