getVersionCommand function

Future<String> getVersionCommand(
  1. ExecuteCommandFunction executeShellCommand
)

Implementation

Future<String> getVersionCommand(
    ExecuteCommandFunction executeShellCommand) async {
  final output = await executeShellCommand(ExecuteCommandInput(
    command: "shopify",
    args: ["version"],
  ));
  return RegExp(_versionRegex).firstMatch(output.stdout)?.group(0) ?? "";
}