runCommandUsingConfig static method

Future<(int, List<String>)> runCommandUsingConfig({
  1. required String executable,
  2. required List<String> arguments,
  3. required BPConfig config,
  4. String? startMessage,
  5. String? successMessage,
  6. String? errorMessage,
  7. bool exitIfError = true,
  8. List<String>? redactions,
  9. bool? clearStartMessage,
})

Calls the runCommand function of this class under the hood but instead of taking all the arguments, it uses the user provided config to pass the necessary arguments

Implementation

static Future<(int, List<String>)> runCommandUsingConfig({
  required String executable,
  required List<String> arguments,
  required BPConfig config,
  String? startMessage,
  String? successMessage,
  String? errorMessage,
  bool exitIfError = true,
  List<String>? redactions,
  bool? clearStartMessage,
}) async {
  return await runCommand(
    executable: executable,
    arguments: arguments,
    logFilePath: config.logFile,
    stdoutWrite: config.printstdout,
    errorMessage: errorMessage,
    exitIfError: exitIfError,
    startMessage: startMessage,
    successMessage: successMessage,
    redactions: redactions,
    clearStartMessage: clearStartMessage,
  );
}