Avoid caching empty plugin outcomes when plugins feature is disabled

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Sayan Sisodiya
2026-03-05 15:19:06 -08:00
parent 81e641c6ea
commit 464d4da7f6

View File

@@ -260,11 +260,6 @@ impl PluginsManager {
) -> PluginLoadOutcome {
if !plugins_feature_enabled_from_stack(config_layer_stack) {
info!(cwd = ?cwd, "plugins disabled in config layer stack");
let mut cache = match self.cache_by_cwd.write() {
Ok(cache) => cache,
Err(err) => err.into_inner(),
};
cache.insert(cwd.to_path_buf(), PluginLoadOutcome::default());
return PluginLoadOutcome::default();
}