sxyazi/yazi · error
You have modified the contents of the `{}` {}. For safety, t
Error message
You have modified the contents of the `{}` {}. For safety, the operation has been aborted.
Please manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes. What it means
Error "You have modified the contents of the `{}` {}. For safety, the operation has been aborted. Please manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes." thrown in sxyazi/yazi.
Source
Thrown at yazi-cli/src/package/hash.rs:47
}
}
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {}
Err(e) => Err(e).context(format!("failed to read `{}`", dir.join("assets").display()))?,
}
assets.sort_unstable_by(|(a, _), (b, _)| a.cmp(b));
for (name, data) in assets {
h.write(name.as_bytes());
h.write(b"pQU2in0xcsu97Y77Nuq2LnT8mczMlFj22idcYRmMrglqU\0");
h.write(&data);
}
Ok(format!("{:x}", h.finish_128()))
}
pub(super) async fn hash_check(&self) -> Result<()> {
if self.hash != self.hash().await? {
bail!(
"You have modified the contents of the `{}` {}. For safety, the operation has been aborted.
Please manually delete it from `{}` and re-run the command, or use `--discard` to discard those local changes.",
self.name,
if self.is_flavor { "flavor" } else { "plugin" },
self.target().display()
);
}
Ok(())
}
}
View on GitHub (pinned to 5f901b886b)
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.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at yazi-cli/src/package/hash.rs:47 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sxyazi/yazi@5f901b886b (2026-09-02).
Data as JSON: /api/errors/50b32bcc2f55518a.
Report an issue: GitHub.