Clean up environment loading a bit (#28356)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Cole Miller 2025-04-08 22:16:35 -04:00 committed by GitHub
parent b687a5e56d
commit f0b7f355a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 100 additions and 101 deletions

View file

@ -295,10 +295,13 @@ fn local_task_context_for_location(
.and_then(|worktree| worktree.read(cx).root_dir());
cx.spawn(async move |cx| {
let worktree_abs_path = worktree_abs_path.clone();
let project_env = environment
.update(cx, |environment, cx| {
environment.get_environment(worktree_abs_path.clone(), cx)
environment.get_buffer_environment(
location.buffer.clone(),
worktree_store.clone(),
cx,
)
})
.ok()?
.await;