Sha256: d188f4c5d590920c62aee404135602b20eba4cd58704e25e5a5a3485e791119b

Contents?: true

Size: 840 Bytes

Versions: 11

Compression:

Stored size: 840 Bytes

Contents

# frozen_string_literal: true

module Script
  module Commands
    class Disable < ShopifyCli::Command
      def call(_args, _name)
        ShopifyCli::Tasks::EnsureEnv.call(@ctx, required: [:api_key, :secret, :shop])
        project = ScriptProject.current
        Layers::Application::DisableScript.call(
          ctx: @ctx,
          api_key: project.env[:api_key],
          shop_domain: project.env[:shop],
          extension_point_type: project.extension_point_type
        )
        @ctx.puts(@ctx.message('script.disable.script_disabled'))
      rescue StandardError => e
        UI::ErrorHandler.pretty_print_and_raise(e, failed_op: @ctx.message('script.disable.error.operation_failed'))
      end

      def self.help
        ShopifyCli::Context.message('script.disable.help', ShopifyCli::TOOL_NAME)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shopify-cli-1.6.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.5.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.4.1 lib/project_types/script/commands/disable.rb
shopify-cli-1.4.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.3.1 lib/project_types/script/commands/disable.rb
shopify-cli-1.3.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.2.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.1.2 lib/project_types/script/commands/disable.rb
shopify-cli-1.1.1 lib/project_types/script/commands/disable.rb
shopify-cli-1.1.0 lib/project_types/script/commands/disable.rb
shopify-cli-1.0.5 lib/project_types/script/commands/disable.rb