{"record":{"id":"d4b0dc86f1ec43c9","repo":"puppetlabs/puppet","slug":"cannot-read-nonexistent-file-file","errorCode":null,"errorMessage":"Cannot read nonexistent file %{file}","messagePattern":"Cannot read nonexistent file %(.+?)","errorType":"validation","errorClass":"IniParseError","httpStatus":null,"severity":"error","filePath":"lib/puppet/util/inifile.rb","lineNumber":140,"sourceCode":"    attr_accessor :destroy_empty\n\n    # @!attribute [rw] file_collection\n    #   @return [Puppet::Util::IniConfig::FileCollection]\n    attr_accessor :file_collection\n\n    def initialize(file, options = {})\n      @file = file\n      @contents = []\n      @filetype = Puppet::Util::FileType.filetype(:flat).new(file)\n\n      @destroy_empty = options.fetch(:destroy_empty, false)\n    end\n\n    # Read and parse the on-disk file associated with this object\n    def read\n      text = @filetype.read\n      if text.nil?\n        raise IniParseError, _(\"Cannot read nonexistent file %{file}\") % { file: @file.inspect }\n      end\n\n      parse(text)\n    end\n\n    INI_COMMENT = Regexp.union(\n      /^\\s*$/,\n      /^[#;]/,\n      /^\\s*rem\\s/i\n    )\n    INI_CONTINUATION = /^[ \\t\\r\\n\\f]/\n    INI_SECTION_NAME = /^\\[([^\\]]+)\\]/\n    INI_PROPERTY     = /^\\s*([^\\s=]+)\\s*=\\s*(.*)$/\n\n    # @api private\n    def parse(text)\n      section = nil   # The name of the current section\n      optname = nil   # The name of the last option in section","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/util/inifile.rb#L122-L158","documentation":"Error \"Cannot read nonexistent file %{file}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/util/inifile.rb:140 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"}