Sha256: 03d87eaea01ec8a153a5e6db5c474ae5f3b60e160ed0216bafff9e206833e582

Contents?: true

Size: 464 Bytes

Versions: 20

Compression:

Stored size: 464 Bytes

Contents

require 'cli/kit'

module ShopifyCli
  module Core
    class HelpResolver < CLI::Kit::Resolver
      def call(args)
        args = args.dup
        return super(args) unless args.first
        if args.first.include?('-h') || args.first.include?('--help')
          help = Commands::Help
          help.ctx = Context.new
          help.call([], nil)
          raise ShopifyCli::AbortSilent
        else
          super(args)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shopify-cli-1.6.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.5.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.4.1 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.4.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.3.1 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.3.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.2.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.1.2 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.1.1 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.1.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.5 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.4 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.3 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.2 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.1 lib/shopify-cli/core/help_resolver.rb
shopify-cli-1.0.0 lib/shopify-cli/core/help_resolver.rb
shopify-cli-0.9.3 lib/shopify-cli/core/help_resolver.rb
shopify-cli-0.9.2 lib/shopify-cli/core/help_resolver.rb
shopify-cli-0.9.1 lib/shopify-cli/core/help_resolver.rb
shopify-cli-0.9.0 lib/shopify-cli/core/help_resolver.rb