From be531653a4c84cecdae2be06227b1d907eb08cbb Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Tue, 8 Oct 2024 11:54:28 +0200 Subject: [PATCH] Direnv warn (#18850) Follow-up fixes to #18567 Release Notes: - N/A --- crates/activity_indicator/src/activity_indicator.rs | 3 ++- crates/project/src/environment.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs index 2a4f233db1..687519068d 100644 --- a/crates/activity_indicator/src/activity_indicator.rs +++ b/crates/activity_indicator/src/activity_indicator.rs @@ -195,7 +195,8 @@ impl ActivityIndicator { on_click: Some(Arc::new(move |this, cx| { this.project.update(cx, |project, cx| { project.remove_environment_error(cx, worktree_id); - }) + }); + cx.dispatch_action(Box::new(workspace::OpenLog)); })), }); } diff --git a/crates/project/src/environment.rs b/crates/project/src/environment.rs index 1f6d5ba3d1..b7aa20a740 100644 --- a/crates/project/src/environment.rs +++ b/crates/project/src/environment.rs @@ -134,7 +134,7 @@ impl ProjectEnvironment { let load_direnv = ProjectSettings::get_global(cx).load_direnv.clone(); cx.spawn(|this, mut cx| async move { - let (mut shell_env, error) = cx + let (mut shell_env, error_message) = cx .background_executor() .spawn({ let cwd = worktree_abs_path.clone(); @@ -152,7 +152,7 @@ impl ProjectEnvironment { set_origin_marker(shell_env, EnvironmentOrigin::WorktreeShell); } - if let Some(error) = error { + if let Some(error) = error_message { this.update(&mut cx, |this, _| { this.environment_error_messages.insert(worktree_id, error); })