From 84eb7fb40f4f713bf832a308c48be48fee9efe38 Mon Sep 17 00:00:00 2001 From: Mahmo <2393401k@student.gla.ac.uk> Date: Sat, 14 Mar 2026 16:08:44 +0000 Subject: [PATCH] fix(env): check all shell profiles in `vp env doctor` IDE integration The install script writes env sourcing to .zshrc, .bashrc, .bash_profile, and .profile, but the doctor only checked .zshenv and .profile (macOS) or .profile alone (Linux). This caused false negatives where the doctor reported IDE integration wasn't set up even when it was. Check all profiles the install script may have written to, matching the same set used by `vp implode` for cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/vite_global_cli/src/commands/env/doctor.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/crates/vite_global_cli/src/commands/env/doctor.rs b/crates/vite_global_cli/src/commands/env/doctor.rs index 610a277922..4c33df538e 100644 --- a/crates/vite_global_cli/src/commands/env/doctor.rs +++ b/crates/vite_global_cli/src/commands/env/doctor.rs @@ -457,15 +457,8 @@ fn check_profile_files(vite_plus_home: &str) -> Option { search_strings.push(format!("{home_dir}{suffix}{env_suffix}")); } - #[cfg(target_os = "macos")] - let profile_files: &[&str] = &[".zshenv", ".profile"]; - - #[cfg(target_os = "linux")] - let profile_files: &[&str] = &[".profile"]; - - // Fallback for other Unix platforms - #[cfg(not(any(target_os = "macos", target_os = "linux")))] - let profile_files: &[&str] = &[".profile"]; + // Check all profiles the install script may have written to + let profile_files: &[&str] = &[".zshenv", ".zshrc", ".bash_profile", ".bashrc", ".profile"]; for file in profile_files { let full_path = format!("{home_dir}/{file}");