Fix selecting and deleting user toolchains (#39068)
I was trying to use the new user toolchains but every time I clicked on one I had added, it would delete it from the picker. Ironically, it wouldn't delete it permanently when I tried to by clicking on the trash can icon. Every time I reopened the workspace all user toolchains were there. Release Notes: - Fixed selecting and deleting user toolchains.
This commit is contained in:
@@ -997,6 +997,13 @@ impl WorkspaceDb {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conn.exec_bound(
|
||||
sql!(
|
||||
DELETE FROM user_toolchains WHERE workspace_id = ?1;
|
||||
)
|
||||
)?(workspace.id).context("Clearing old user toolchains")?;
|
||||
|
||||
for (scope, toolchains) in workspace.user_toolchains {
|
||||
for toolchain in toolchains {
|
||||
let query = sql!(INSERT OR REPLACE INTO user_toolchains(remote_connection_id, workspace_id, worktree_id, relative_worktree_path, language_name, name, path, raw_json) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8));
|
||||
|
||||
Reference in New Issue
Block a user