puppetlabs/puppet · error · ArgumentError

Options 'include_containers' and 'include_values' cannot bot

Error message

Options 'include_containers' and 'include_values' cannot both be false

What it means

Error "Options 'include_containers' and 'include_values' cannot both be false" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/pops/types/tree_iterators.rb:47

  #
  def initialize(enum, options = EMPTY_HASH)
    @root = enum
    @element_t = nil
    @value_stack = [enum]
    @indexer_stack = []
    @current_path = []
    @recursed = false
    @containers_t = options['container_type'] || DEFAULT_CONTAINERS
    unless DEFAULT_CONTAINERS.assignable?(@containers_t)
      raise ArgumentError, _("Only Array, Hash, and Object types can be used as container types. Got %{type}") % { type: @containers_t }
    end

    @with_root       = extract_option(options, 'include_root', true)
    @with_containers = extract_option(options, 'include_containers', true)
    @with_values     = extract_option(options, 'include_values', true)
    @with_root       = @with_containers && extract_option(options, 'include_root', true)
    unless @with_containers || @with_values
      raise ArgumentError, _("Options 'include_containers' and 'include_values' cannot both be false")
    end

    @include_refs = !!options['include_refs']
  end

  # Yields each `path, value` if the block arity is 2, and only `value` if arity is 1
  #
  def each(&block)
    loop do
      if block.arity == 1
        yield(self.next)
      else
        yield(*self.next)
      end
    end
  end

  def size

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/pops/types/tree_iterators.rb:47 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/22dc4b27d1aa8a52. Report an issue: GitHub.