Make it more clear that missing prettier is to blame
This commit is contained in:
parent
369b5140fb
commit
cf95f9b082
2 changed files with 84 additions and 8 deletions
|
@ -4179,9 +4179,15 @@ impl Project {
|
|||
},
|
||||
}
|
||||
});
|
||||
anyhow::bail!(
|
||||
"Failed to create prettier instance from {prettier_path:?} for buffer during autoformatting: {e:#}"
|
||||
)},
|
||||
match &prettier_path {
|
||||
Some(prettier_path) => {
|
||||
log::error!("Failed to create prettier instance from {prettier_path:?} for buffer during autoformatting: {e:#}");
|
||||
},
|
||||
None => {
|
||||
log::error!("Failed to create default prettier instance for buffer during autoformatting: {e:#}");
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if let Some((language_server, buffer_abs_path)) =
|
||||
language_server.as_ref().zip(buffer_abs_path.as_ref())
|
||||
|
@ -4229,9 +4235,15 @@ impl Project {
|
|||
},
|
||||
}
|
||||
});
|
||||
anyhow::bail!(
|
||||
"Failed to create prettier instance from {prettier_path:?} for buffer during formatting: {e:#}"
|
||||
)},
|
||||
match &prettier_path {
|
||||
Some(prettier_path) => {
|
||||
log::error!("Failed to create prettier instance from {prettier_path:?} for buffer during autoformatting: {e:#}");
|
||||
},
|
||||
None => {
|
||||
log::error!("Failed to create default prettier instance for buffer during autoformatting: {e:#}");
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue