feat: when a plugin already exists, clearly show its path

This way the user can easily diagnose the situation without knowing the
internals of the yazi plugin system.
This commit is contained in:
Mika Vilpas 2024-05-09 16:07:37 +03:00
parent 4c5704e970
commit e31cd97154

View file

@ -22,8 +22,9 @@ impl Package {
let tracker = to.join(TRACKER); let tracker = to.join(TRACKER);
if maybe_exists(&to).await && !must_exists(&tracker).await { if maybe_exists(&to).await && !must_exists(&tracker).await {
bail!( bail!(
"A user package with the same name `{name}` already exists. "A user package with the same name `{}` already exists.
For safety, please manually delete it from your plugin/flavor directory and re-run the command." For safety, please manually delete it and re-run the command.",
to.display()
); );
} }