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
This commit is contained in:
张小白 2024-11-22 07:32:49 +08:00 committed by GitHub
parent 0663bf2a53
commit 9211e699ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,7 +139,8 @@ impl super::LspAdapter for GoLspAdapter {
let gobin_dir = container_dir.join("gobin"); let gobin_dir = container_dir.join("gobin");
fs::create_dir_all(&gobin_dir).await?; 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("GO111MODULE", "on")
.env("GOBIN", &gobin_dir) .env("GOBIN", &gobin_dir)
.args(["install", "golang.org/x/tools/gopls@latest"]) .args(["install", "golang.org/x/tools/gopls@latest"])