Log error and proceed when failing to load repo environment (#27938)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
646f65511c
commit
3e2ac3e7bc
2 changed files with 17 additions and 5 deletions
|
@ -3632,12 +3632,13 @@ impl Repository {
|
|||
.upgrade()
|
||||
.ok_or_else(|| anyhow!("missing project environment"))?
|
||||
.update(cx, |project_environment, cx| {
|
||||
project_environment.get_environment(Some(work_directory_abs_path), cx)
|
||||
project_environment.get_environment(Some(work_directory_abs_path.clone()), cx)
|
||||
})?
|
||||
.await
|
||||
.ok_or_else(|| {
|
||||
anyhow!("failed to get environment for repository working directory")
|
||||
})?;
|
||||
.unwrap_or_else(|| {
|
||||
log::error!("failed to get working directory environment for repository {work_directory_abs_path:?}");
|
||||
HashMap::default()
|
||||
});
|
||||
let backend = cx
|
||||
.background_spawn(async move {
|
||||
fs.open_repo(&dot_git_abs_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue