Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terraform: Don't cache user-installed `terraform-ls` (#10641)
Marshall Bowersfa0302f15687
diff --git a/extensions/terraform/src/terraform.rs b/extensions/terraform/src/terraform.rsindex 8dfabce23e8..e0903957208 100644--- a/extensions/terraform/src/terraform.rs+++ b/extensions/terraform/src/terraform.rs@@ -12,17 +12,16 @@ impl TerraformExtension {language_server_id: &LanguageServerId,worktree: &zed::Worktree,) -> Result<String> {+ if let Some(path) = worktree.which("terraform-ls") {+ 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("terraform-ls") {- self.cached_binary_path = Some(path.clone());- return Ok(path);- }-zed::set_language_server_installation_status(&language_server_id,&zed::LanguageServerInstallationStatus::CheckingForUpdate,