Fix bug where deleted toolchains stay selected on startup (#30562)
This affects python's when debugging because the selected toolchain is used as the python binary to spawn Debugpy Release Notes: - Fix bug where selected toolchain didn't exist
This commit is contained in:
parent
ced8e4d88e
commit
e3d3daec92
1 changed files with 6 additions and 0 deletions
|
@ -1369,7 +1369,13 @@ impl Workspace {
|
||||||
};
|
};
|
||||||
|
|
||||||
let toolchains = DB.toolchains(workspace_id).await?;
|
let toolchains = DB.toolchains(workspace_id).await?;
|
||||||
|
|
||||||
for (toolchain, worktree_id, path) in toolchains {
|
for (toolchain, worktree_id, path) in toolchains {
|
||||||
|
let toolchain_path = PathBuf::from(toolchain.path.clone().to_string());
|
||||||
|
if !app_state.fs.is_file(toolchain_path.as_path()).await {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
project_handle
|
project_handle
|
||||||
.update(cx, |this, cx| {
|
.update(cx, |this, cx| {
|
||||||
this.activate_toolchain(ProjectPath { worktree_id, path }, toolchain, cx)
|
this.activate_toolchain(ProjectPath { worktree_id, path }, toolchain, cx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue