Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
csharp: Don't cache user-installed `OmniSharp` (#10638)
Marshall Bowers58991f332bf0
diff --git a/extensions/csharp/src/csharp.rs b/extensions/csharp/src/csharp.rsindex 72a2e69aeec..b9f97b319b8 100644--- a/extensions/csharp/src/csharp.rs+++ b/extensions/csharp/src/csharp.rs@@ -11,17 +11,16 @@ impl CsharpExtension {config: zed::LanguageServerConfig,worktree: &zed::Worktree,) -> Result<String> {+ if let Some(path) = worktree.which("OmniSharp") {+ return Ok(path);+ }+if let Some(path) = &self.cached_binary_path {if fs::metadata(path).map_or(false, |stat| stat.is_file()) {return Ok(path.clone());}}- if let Some(path) = worktree.which("OmniSharp") {- self.cached_binary_path = Some(path.clone());- return Ok(path);- }-zed::set_language_server_installation_status(&config.name,&zed::LanguageServerInstallationStatus::CheckingForUpdate,