puppetlabs/puppet · error · ArgumentError

Unknown injection %{injection_name}

Error message

Unknown injection %{injection_name}

What it means

Error "Unknown injection %{injection_name}" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/pops/functions/dispatch.rb:91

    else
      new_args = []
      @weaving.each do |knit|
        if knit.is_a?(Array)
          injection_name = @injections[knit[0]]
          new_args <<
            case injection_name
            when :scope
              scope
            when :pal_script_compiler
              Puppet.lookup(:pal_script_compiler)
            when :cache
              Puppet::Pops::Adapters::ObjectIdCacheAdapter.adapt(scope.compiler)
            when :pal_catalog_compiler
              Puppet.lookup(:pal_catalog_compiler)
            when :pal_compiler
              Puppet.lookup(:pal_compiler)
            else
              raise ArgumentError, _("Unknown injection %{injection_name}") % { injection_name: injection_name }
            end
        elsif knit < 0
          # Careful so no new nil arguments are added since they would override default
          # parameter values in the received
          idx = -knit - 1
          new_args += args[idx..] if idx < args.size
        elsif knit < args.size
          new_args << args[knit]
        end
      end
      new_args
    end
  end
end
end
end

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/pops/functions/dispatch.rb:91 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/9c6ec1615fb9599c. Report an issue: GitHub.