Sha256: b84b5a683e3314d4e3b0c742e664055476e98a0cd9914b5f574a10f585a80605
Contents?: true
Size: 823 Bytes
Versions: 26
Compression:
Stored size: 823 Bytes
Contents
# frozen_string_literal: true module Script module Forms class AskApp < ShopifyCLI::Form attr_reader :app def ask apps = @xargs.fetch(:apps) unless @xargs[:acting_as_shopify_organization] apps = apps.select { |app| app["appType"] == "custom" } end raise Errors::NoExistingAppsError if apps.empty? @app = if apps.count > 1 CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.app_select")) do |handler| apps.each do |app| handler.option(app["title"]) { app } end end else apps.first.tap do |app| ctx.puts(ctx.message("script.application.ensure_env.app", app["title"])) end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems