createOrSelectStack static method

Future<Stack> createOrSelectStack(
  1. RemoteGitProgramArgs args, {
  2. RemoteWorkspaceOptions remoteOptions = const RemoteWorkspaceOptions(),
  3. LocalWorkspaceOptions workspaceOptions = const LocalWorkspaceOptions(),
})

Creates the stack when missing, otherwise selects it.

Implementation

static Future<Stack> createOrSelectStack(
  RemoteGitProgramArgs args, {
  RemoteWorkspaceOptions remoteOptions = const RemoteWorkspaceOptions(),
  LocalWorkspaceOptions workspaceOptions = const LocalWorkspaceOptions(),
}) async {
  final workspace = await _createRemoteWorkspace(
    args,
    remoteOptions: remoteOptions,
    workspaceOptions: workspaceOptions,
  );
  return Stack.createOrSelect(args.stackName, workspace);
}