Sha256: 090d101183e4d899d4876c7833845cb71f1ac64478e23166052470a545d36d86

Contents?: true

Size: 612 Bytes

Versions: 47

Compression:

Stored size: 612 Bytes

Contents

require "shopify_cli"

module ShopifyCLI
  module Tasks
    class EnsureAuthenticated < ShopifyCLI::Task
      def call(ctx)
        return if ShopifyCLI::Environment.acceptance_test?
        unless ShopifyCLI::IdentityAuth.authenticated?
          raise ShopifyCLI::Abort,
            ctx.message("core.identity_auth.login_prompt", ShopifyCLI::TOOL_NAME)
        end
        if ShopifyCLI::IdentityAuth.environment_auth_token?
          ctx.puts(ctx.message("core.identity_auth.token_authentication",
            ShopifyCLI::Constants::EnvironmentVariables::AUTH_TOKEN))
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.35.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.34.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.33.1 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.33.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.32.1 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.32.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.31.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.30.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.29.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.28.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.27.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.26.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.25.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.24.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.23.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.22.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.21.0 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.20.1 lib/shopify_cli/tasks/ensure_authenticated.rb
shopify-cli-2.20.0 lib/shopify_cli/tasks/ensure_authenticated.rb