Fix toolchain detection for worktree-local paths (#20229)
Reimplements `pet::EnvironmentApi`, trying to access the `project_env` first Closes #20177 Release Notes: - Fixed python toolchain detection when worktree local path is set
This commit is contained in:
parent
f8bd6c66f4
commit
a26c0a8537
8 changed files with 132 additions and 13 deletions
|
@ -7,6 +7,7 @@
|
|||
use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use collections::HashMap;
|
||||
use gpui::{AsyncAppContext, SharedString};
|
||||
use settings::WorktreeId;
|
||||
|
||||
|
@ -23,7 +24,11 @@ pub struct Toolchain {
|
|||
|
||||
#[async_trait(?Send)]
|
||||
pub trait ToolchainLister: Send + Sync {
|
||||
async fn list(&self, _: PathBuf) -> ToolchainList;
|
||||
async fn list(
|
||||
&self,
|
||||
worktree_root: PathBuf,
|
||||
project_env: Option<HashMap<String, String>>,
|
||||
) -> ToolchainList;
|
||||
}
|
||||
|
||||
#[async_trait(?Send)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue