{"record":{"id":"50b32bcc2f55518a","repo":"sxyazi/yazi","slug":"you-have-modified-the-contents-of-the-for","errorCode":null,"errorMessage":"You have modified the contents of the `{}` {}. For safety, the operation has been aborted.\nPlease manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes.","messagePattern":"You have modified the contents of the `(.+?)` (.+?)\\. For safety, the operation has been aborted\\.\nPlease manually delete it from `(.+?)` and re-run the command, or use `--discard` to discard those local changes\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-cli/src/package/hash.rs","lineNumber":47,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t\tErr(e) if e.kind() == std::io::ErrorKind::NotFound => {}\n\t\t\tErr(e) => Err(e).context(format!(\"failed to read `{}`\", dir.join(\"assets\").display()))?,\n\t\t}\n\n\t\tassets.sort_unstable_by(|(a, _), (b, _)| a.cmp(b));\n\t\tfor (name, data) in assets {\n\t\t\th.write(name.as_bytes());\n\t\t\th.write(b\"pQU2in0xcsu97Y77Nuq2LnT8mczMlFj22idcYRmMrglqU\\0\");\n\t\t\th.write(&data);\n\t\t}\n\n\t\tOk(format!(\"{:x}\", h.finish_128()))\n\t}\n\n\tpub(super) async fn hash_check(&self) -> Result<()> {\n\t\tif self.hash != self.hash().await? {\n\t\t\tbail!(\n\t\t\t\t\"You have modified the contents of the `{}` {}. For safety, the operation has been aborted.\nPlease manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes.\",\n\t\t\t\tself.name,\n\t\t\t\tif self.is_flavor { \"flavor\" } else { \"plugin\" },\n\t\t\t\tself.target().display()\n\t\t\t);\n\t\t}\n\t\tOk(())\n\t}\n}\n","sourceCodeStart":29,"sourceCodeEnd":58,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-cli/src/package/hash.rs#L29-L58","documentation":"Error \"You have modified the contents of the `{}` {}. For safety, the operation has been aborted.\nPlease manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes.\" thrown in sxyazi/yazi.","triggerScenarios":"Thrown at yazi-cli/src/package/hash.rs:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If the local changes are intentional, back them up, delete the package directory shown in the message, and re-run the command to reinstall.","Pass `--discard` to throw away local changes and let the operation proceed.","Avoid editing files inside managed package directories; keep customizations in your own config."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}