Improve error message around failing to install dev extensions (#30711)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
1fb1fecb0a
commit
83498ebf2b
3 changed files with 7 additions and 2 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -5161,6 +5161,7 @@ dependencies = [
|
||||||
"fuzzy",
|
"fuzzy",
|
||||||
"gpui",
|
"gpui",
|
||||||
"language",
|
"language",
|
||||||
|
"log",
|
||||||
"num-format",
|
"num-format",
|
||||||
"picker",
|
"picker",
|
||||||
"project",
|
"project",
|
||||||
|
|
|
@ -23,6 +23,7 @@ fs.workspace = true
|
||||||
fuzzy.workspace = true
|
fuzzy.workspace = true
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
language.workspace = true
|
language.workspace = true
|
||||||
|
log.workspace = true
|
||||||
num-format.workspace = true
|
num-format.workspace = true
|
||||||
picker.workspace = true
|
picker.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
|
@ -37,9 +38,9 @@ theme.workspace = true
|
||||||
ui.workspace = true
|
ui.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
vim_mode_setting.workspace = true
|
vim_mode_setting.workspace = true
|
||||||
|
workspace-hack.workspace = true
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
zed_actions.workspace = true
|
zed_actions.workspace = true
|
||||||
workspace-hack.workspace = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
editor = { workspace = true, features = ["test-support"] }
|
editor = { workspace = true, features = ["test-support"] }
|
||||||
|
|
|
@ -132,10 +132,13 @@ pub fn init(cx: &mut App) {
|
||||||
match install_task.await {
|
match install_task.await {
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
log::error!("Failed to install dev extension: {:?}", err);
|
||||||
workspace_handle
|
workspace_handle
|
||||||
.update(cx, |workspace, cx| {
|
.update(cx, |workspace, cx| {
|
||||||
workspace.show_error(
|
workspace.show_error(
|
||||||
&err.context("failed to install dev extension"),
|
// NOTE: using `anyhow::context` here ends up not printing
|
||||||
|
// the error
|
||||||
|
&format!("Failed to install dev extension: {}", err),
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue