Class: ShopifyCLI::Tasks::EnsureProjectType

Inherits:
ShopifyCLI::Task show all
Defined in:
lib/shopify_cli/tasks/ensure_project_type.rb

Instance Method Summary collapse

Instance Method Details

#call(ctx, project_type) ⇒ Object



6
7
8
9
10
11
# File 'lib/shopify_cli/tasks/ensure_project_type.rb', line 6

def call(ctx, project_type)
  if project_type.to_sym == ShopifyCLI::Project.current_project_type || Environment.run_as_subprocess?
    return true
  end
  ctx.abort(ctx.message("core.tasks.ensure_project_type.wrong_project_type", project_type))
end