mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix(plugin): validate plugin path existence before file create
Previously, the deployment logic did not verify the existence of the plugin repository path before attempting to create files. This could lead to redundant file creation operations when the plugin path was invalid. - Add pre-check for plugin directory existence - Fail early when plugin path is not found Fixes #1763
This commit is contained in:
parent
7e427fed56
commit
e76ce7c7f6
1 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,11 @@ impl Dependency {
|
|||
let from = self.local().join(&self.child);
|
||||
|
||||
self.header("Deploying package `{name}`")?;
|
||||
// TODO: maybe need to be removed
|
||||
let plugin_exists = maybe_exists(&from).await;
|
||||
if !plugin_exists {
|
||||
bail!("Plugin `{}` not found", self.name);
|
||||
}
|
||||
self.is_flavor = maybe_exists(&from.join("flavor.toml")).await;
|
||||
|
||||
let to = self.target();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue