Sha256: 09188f24ea4e57c2bbfb5ba412d91a13206f8fa2c4aa7a5428583eb547f0fac6

Contents?: true

Size: 637 Bytes

Versions: 34

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Script
  module Forms
    class AskScriptUuid < ShopifyCLI::Form
      attr_reader :uuid
      def ask
        scripts = @xargs

        return if scripts.empty? ||
          !CLI::UI::Prompt.confirm(ctx.message("script.application.ensure_env.ask_connect_to_existing_script"))

        @uuid =
          CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.ask_which_script_to_connect_to")) do |handler|
            scripts.each do |script|
              handler.option("#{script["title"]} (#{script["uuid"]})") { script["uuid"] }
            end
          end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
shopify-cli-2.25.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.24.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.23.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.22.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.21.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.20.1 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.20.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.19.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.18.1 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.18.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.17.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.16.1 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.16.0 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.6 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.5 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.4 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.3 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.2 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.1 lib/project_types/script/forms/ask_script_uuid.rb
shopify-cli-2.15.0 lib/project_types/script/forms/ask_script_uuid.rb