puppetlabs/puppet · error · ArgumentError
'%{exe}' is a %{klass}, not a file
Error message
'%{exe}' is a %{klass}, not a file What it means
Error "'%{exe}' is a %{klass}, not a file" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/provider/exec/windows.rb:43
scripts, specify the `remotesigned` execution policy as part of the
command:
exec { 'test':
path => 'C:/Windows/System32/WindowsPowerShell/v1.0',
command => 'powershell -executionpolicy remotesigned -file C:/test.ps1',
}
EOT
# Verify that we have the executable
def checkexe(command)
exe = extractexe(command)
if absolute_path?(exe)
if !Puppet::FileSystem.exist?(exe)
raise ArgumentError, _("Could not find command '%{exe}'") % { exe: exe }
elsif !File.file?(exe)
raise ArgumentError, _("'%{exe}' is a %{klass}, not a file") % { exe: exe, klass: File.ftype(exe) }
end
return
end
if resource[:path]
Puppet::Util.withenv('PATH' => resource[:path].join(File::PATH_SEPARATOR)) do
return if which(exe)
end
end
raise ArgumentError, _("Could not find command '%{exe}'") % { exe: exe }
end
end
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/provider/exec/windows.rb:43 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/d06d23c4f5c38313.
Report an issue: GitHub.