puppetlabs/puppet · error · Puppet::ParseError

Generators must be fully qualified

Error message

Generators must be fully qualified

What it means

Error "Generators must be fully qualified" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/parser/functions/generate.rb:17

# frozen_string_literal: true

# Runs an external command and returns the results
Puppet::Parser::Functions.newfunction(:generate, :arity => -2, :type => :rvalue,
                                                 :doc => "Calls an external command on the Puppet master and returns
    the results of the command. Any arguments are passed to the external command as
    arguments. If the generator does not exit with return code of 0,
    the generator is considered to have failed and a parse error is
    thrown. Generators can only have file separators, alphanumerics, dashes,
    and periods in them. This function will attempt to protect you from
    malicious generator calls (e.g., those with '..' in them), but it can
    never be entirely safe. No subshell is used to execute
    generators, so all shell metacharacters are passed directly to
    the generator, and all metacharacters are returned by the function.
    Consider cleaning white space from any string generated.") do |args|
  # TRANSLATORS "fully qualified" refers to a fully qualified file system path
  raise Puppet::ParseError, _("Generators must be fully qualified") unless Puppet::Util.absolute_path?(args[0])

  if Puppet::Util::Platform.windows?
    valid = args[0] =~ %r{^[a-z]:(?:[/\\][-.~\w]+)+$}i
  else
    valid = args[0] =~ %r{^[-/\w.+]+$}
  end

  unless valid
    raise Puppet::ParseError, _("Generators can only contain alphanumerics, file separators, and dashes")
  end

  if args[0] =~ /\.\./
    raise Puppet::ParseError, _("Can not use generators with '..' in them.")
  end

  begin
    dir = File.dirname(args[0])
    Puppet::Util::Execution.execute(args, failonfail: true, combine: true, cwd: dir).to_str

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/parser/functions/generate.rb:17 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/d297182fa2785e13. Report an issue: GitHub.