Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions crates/vite_global_cli/src/commands/env/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,15 +457,8 @@ fn check_profile_files(vite_plus_home: &str) -> Option<String> {
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"];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude interactive rc files from IDE integration signal

check_profile_files now treats .zshrc and .bashrc as sufficient for passing "IDE integration", but those files are for interactive shells rather than GUI app environments (packages/cli/install.sh:350-372), and the doctor guidance itself still tells Linux users to configure ~/.profile for IDEs (print_ide_setup_guidance, doctor.rs:516-520). In setups where only .bashrc is present/updated, vp env doctor will report IDE integration as configured and suppress the IDE setup warning even though desktop-launched IDEs can still miss the PATH change.

Useful? React with 👍 / 👎.


for file in profile_files {
let full_path = format!("{home_dir}/{file}");
Expand Down
Loading