Sha256: 2945fe2f4d532f9b3f868be87c98b6fc468d8a3fb6bc3d7ba83f6f500569f8e8

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

require "shopify_cli"

module ShopifyCli
  module Tasks
    class ConfirmStore < ShopifyCli::Task
      def call(ctx)
        @ctx = ctx
        store = ShopifyCli::AdminAPI.get_shop_or_abort(ctx)
        if CLI::UI::Prompt.confirm(ctx.message("core.tasks.confirm_store.prompt", store), default: false)
          ctx.puts(ctx.message("core.tasks.confirm_store.confirmation", store))
        else
          ctx.puts(ctx.message("core.tasks.confirm_store.cancelling"))
          raise AbortSilent
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
shopify-cli-2.4.0 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.3.0 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.2.2 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.2.1 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.2.0 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.1.0 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.0.2 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.0.1 lib/shopify-cli/tasks/confirm_store.rb
shopify-cli-2.0.0 lib/shopify-cli/tasks/confirm_store.rb