def build_task(argv)
      arguments = argv.dup
      task_name = arguments.shift
      klazz     = Task.from_name(task_name)
      klazz.new(*klazz.parse_options!(arguments))
    rescue NameError
      task_not_found(task_name)
      exit false
    rescue ArgumentError
      bad_arguments(task_name)
      exit false
    end
def build_task(argv)
      arguments = argv.dup
      task_name = arguments.shift
      klazz     = Task.from_name(task_name)
      klazz.new(*klazz.parse_options!(arguments))
    rescue NameError
      task_not_found(task_name)
      exit false
    rescue ArgumentError
      bad_arguments(task_name)
      exit false
    end
Builds a task and prepares it to run

 @param argv [Array] Command line arguments
 @return [Anvil::Task] A task ready to run