From 9211e699eef96fc4d67346ec0efac840f6b3aefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B0=8F=E7=99=BD?= <364772080@qq.com> Date: Fri, 22 Nov 2024 07:32:49 +0800 Subject: [PATCH] Follow-up on #18447: Unintentional deletion during merge-conflicts resolution (#20991) After #18447 was merged, I reviewed the PR code as usual. During this review, I realized that some code was unintentionally removed when I was resolving merge conflicts in #18447. Sorry! Release Notes: - N/A --- crates/languages/src/go.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/languages/src/go.rs b/crates/languages/src/go.rs index 64583ad61f..b3073d7eaa 100644 --- a/crates/languages/src/go.rs +++ b/crates/languages/src/go.rs @@ -139,7 +139,8 @@ impl super::LspAdapter for GoLspAdapter { let gobin_dir = container_dir.join("gobin"); fs::create_dir_all(&gobin_dir).await?; - let install_output = util::command::new_smol_command("go") + let go = delegate.which("go".as_ref()).await.unwrap_or("go".into()); + let install_output = util::command::new_smol_command(go) .env("GO111MODULE", "on") .env("GOBIN", &gobin_dir) .args(["install", "golang.org/x/tools/gopls@latest"])