getVersionCommand function

Future<String> getVersionCommand(
  1. ExecuteCommandFunction executeShellCommand
)

Implementation

Future<String> getVersionCommand(
    ExecuteCommandFunction executeShellCommand) async {
  final out = await executeShellCommand(ExecuteCommandInput(
    command: "fig",
    args: ["--version"],
  ));
  final stdout = out.stdout;
  return stdout.substring(stdout.indexOf(" ") + 1).trim();
}