pubOrFail method Null safety

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

Implementation

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