{"record":{"id":"d06d23c4f5c38313","repo":"puppetlabs/puppet","slug":"exe-is-a-klass-not-a-file-d06d23","errorCode":null,"errorMessage":"'%{exe}' is a %{klass}, not a file","messagePattern":"'%(.+?)' is a %(.+?), not a file","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/exec/windows.rb","lineNumber":43,"sourceCode":"    scripts, specify the `remotesigned` execution policy as part of the\n    command:\n\n        exec { 'test':\n          path    => 'C:/Windows/System32/WindowsPowerShell/v1.0',\n          command => 'powershell -executionpolicy remotesigned -file C:/test.ps1',\n        }\n\n  EOT\n\n  # Verify that we have the executable\n  def checkexe(command)\n    exe = extractexe(command)\n\n    if absolute_path?(exe)\n      if !Puppet::FileSystem.exist?(exe)\n        raise ArgumentError, _(\"Could not find command '%{exe}'\") % { exe: exe }\n      elsif !File.file?(exe)\n        raise ArgumentError, _(\"'%{exe}' is a %{klass}, not a file\") % { exe: exe, klass: File.ftype(exe) }\n      end\n\n      return\n    end\n\n    if resource[:path]\n      Puppet::Util.withenv('PATH' => resource[:path].join(File::PATH_SEPARATOR)) do\n        return if which(exe)\n      end\n    end\n\n    raise ArgumentError, _(\"Could not find command '%{exe}'\") % { exe: exe }\n  end\nend\n","sourceCodeStart":25,"sourceCodeEnd":58,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/exec/windows.rb#L25-L58","documentation":"Error \"'%{exe}' is a %{klass}, not a file\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/provider/exec/windows.rb:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}