Class: ShopifyCLI::Core::HelpResolver

Inherits:
CLI::Kit::Resolver
  • Object
show all
Defined in:
lib/shopify_cli/core/help_resolver.rb

Instance Method Summary collapse

Instance Method Details

#call(args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/shopify_cli/core/help_resolver.rb', line 6

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