{"record":{"id":"ad17d7b89ddd65c1","repo":"sds/overcommit","slug":"invalid-eol-option-specified-must-be-n-or","errorCode":null,"errorMessage":"Invalid `eol` option specified: must be \"\\n\" or \"\\r\\n\"","messagePattern":"Invalid `eol` option specified: must be \"\\\\n\" or \"\\\\r\\\\n\"","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/overcommit/hook/pre_commit/line_endings.rb","lineNumber":74,"sourceCode":"\n      result.stdout.split(\"\\0\").map do |file_info|\n        info, path = file_info.split(\"\\t\")\n        i = info.split.first\n        next if i == 'l/-text' # ignore binary files\n        next if i == \"l/#{eol}\"\n\n        path\n      end.compact\n    end\n\n    def eol\n      @eol ||=  case config['eol']\n                when \"\\n\"\n                  'lf'\n                when \"\\r\\n\"\n                  'crlf'\n                else\n                  raise 'Invalid `eol` option specified: must be \"\\n\" or \"\\r\\n\"'\n                end\n    end\n  end\nend\n","sourceCodeStart":56,"sourceCodeEnd":79,"githubUrl":"https://github.com/sds/overcommit/blob/fee0cd74b26eb81f64b43b7fab17bbb541575cc4/lib/overcommit/hook/pre_commit/line_endings.rb#L56-L79","documentation":"Error \"Invalid `eol` option specified: must be \"\\n\" or \"\\r\\n\"\" thrown in sds/overcommit.","triggerScenarios":"Thrown at lib/overcommit/hook/pre_commit/line_endings.rb:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the hook's `eol` option in .overcommit.yml to either \"\\n\" (LF) or \"\\r\\n\" (CRLF).","Remove the `eol` option to use the hook's default line-ending enforcement."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fee0cd74b26eb81f64b43b7fab17bbb541575cc4","analyzedAt":"2026-08-23T04:07:28.153Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}