fix(plugin): allow dev local hot sync across system version gate (#5961)

This commit is contained in:
InfinityPacer
2026-06-17 21:07:27 +08:00
committed by GitHub
parent e1ba9a2c97
commit a516bc1c77
3 changed files with 123 additions and 3 deletions

View File

@@ -466,7 +466,8 @@ class PluginManager(ConfigReloadMixin, metaclass=Singleton):
pid=plugin_dir_name,
package_version=package_version,
repo_path=local_repo_path,
strict_compat=False
strict_compat=False,
strict_system_version=not settings.DEV
)
if candidate:
return candidate
@@ -488,6 +489,9 @@ class PluginManager(ConfigReloadMixin, metaclass=Singleton):
candidate = candidate or PluginHelper().get_local_plugin_candidate(pid)
if not candidate:
return False
if candidate.get("compatible") is False:
logger.info(f"本地插件 {pid} 不满足同步条件,跳过自动同步:{candidate.get('skip_reason')}")
return False
source_dir = Path(candidate.get("path"))
dest_dir = settings.ROOT_PATH / "app" / "plugins" / pid.lower()