puppetlabs/puppet · error · Puppet::MissingCommand

Command is missing

Error message

Command %{name} is missing

What it means

Command sentinel guard: the named command's executable could not be resolved to an absolute path by the resolver, meaning it is not installed or not on the search path.

Solutions

  1. Install the required command on the node
  2. Add the command's directory to the exec resource's 'path' setting
  3. Use an absolute path to the executable
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/puppet/provider/command.rb:24 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/7d211eb75779df4e. Report an issue: GitHub.

Appendix: source

Thrown at lib/puppet/provider/command.rb:24

  attr_reader :name

  # @param [String] name A way of referencing the name
  # @param [String] executable The path to the executable file
  # @param resolver An object for resolving the executable to an absolute path (usually Puppet::Util)
  # @param executor An object for performing the actual execution of the command (usually Puppet::Util::Execution)
  # @param [Hash] options Extra options to be used when executing (see Puppet::Util::Execution#execute)
  def initialize(name, executable, resolver, executor, options = {})
    @name = name
    @executable = executable
    @resolver = resolver
    @executor = executor
    @options = options
  end

  # @param args [Array<String>] Any command line arguments to pass to the executable
  # @return The output from the command
  def execute(*args)
    resolved_executable = @resolver.which(@executable) or raise Puppet::MissingCommand, _("Command %{name} is missing") % { name: @name }
    @executor.execute([resolved_executable] + args, @options)
  end
end

View on GitHub (pinned to e227c27540)