{"id":"0d6477a8e9333d98","repo":"BurntSushi/ripgrep","slug":"sorting-by-last-modified-isn-t-supported-err","errorCode":null,"errorMessage":"sorting by last modified isn't supported: {err}","messagePattern":"sorting by last modified isn't supported: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/core/flags/lowargs.rs","lineNumber":697,"sourceCode":"    LastModified,\n    /// Sort by last accessed time.\n    LastAccessed,\n    /// Sort by creation time.\n    Created,\n}\n\nimpl SortMode {\n    /// Checks whether the selected sort mode is supported. If it isn't, an\n    /// error (hopefully explaining why) is returned.\n    pub(crate) fn supported(&self) -> anyhow::Result<()> {\n        match self.kind {\n            SortModeKind::Path => Ok(()),\n            SortModeKind::LastModified => {\n                let md = std::env::current_exe()\n                    .and_then(|p| p.metadata())\n                    .and_then(|md| md.modified());\n                let Err(err) = md else { return Ok(()) };\n                anyhow::bail!(\n                    \"sorting by last modified isn't supported: {err}\"\n                );\n            }\n            SortModeKind::LastAccessed => {\n                let md = std::env::current_exe()\n                    .and_then(|p| p.metadata())\n                    .and_then(|md| md.accessed());\n                let Err(err) = md else { return Ok(()) };\n                anyhow::bail!(\n                    \"sorting by last accessed isn't supported: {err}\"\n                );\n            }\n            SortModeKind::Created => {\n                let md = std::env::current_exe()\n                    .and_then(|p| p.metadata())\n                    .and_then(|md| md.created());\n                let Err(err) = md else { return Ok(()) };\n                anyhow::bail!(","sourceCodeStart":679,"sourceCodeEnd":715,"githubUrl":"https://github.com/BurntSushi/ripgrep/blob/3fce3b5bb0236da2df6d99672afb8a719642eca7/crates/core/flags/lowargs.rs#L679-L715","documentation":"Error \"sorting by last modified isn't supported: {err}\" thrown in BurntSushi/ripgrep.","triggerScenarios":"Thrown at crates/core/flags/lowargs.rs:697 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a different sort criterion supported on this platform","Check the underlying error; modification time may be unavailable for some files"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"3fce3b5bb0236da2df6d99672afb8a719642eca7","analyzedAt":"2026-08-06T01:39:05.073Z","schemaVersion":2}