fix(env): check all shell profiles in vp env doctor IDE integration#878
fix(env): check all shell profiles in vp env doctor IDE integration#878MahmoodKhalil57 wants to merge 1 commit intovoidzero-dev:mainfrom
vp env doctor IDE integration#878Conversation
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) <noreply@anthropic.com>
✅ Deploy Preview for viteplus-preview canceled.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84eb7fb40f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[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"]; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
.zshrc,.bashrc,.bash_profile, and.profilevp env doctoronly checked.zshenv+.profile(macOS) or.profilealone (Linux)Fixes #881
Now checks all profiles the install script may have written to, matching the same set used by
vp implodefor cleanup.Context
install.shwrites to:.zshenv+.zshrc.bash_profile+.bashrc+.profiledoctor.rsonly checked:.zshenv,.profile.profileSo a Linux user running zsh (env in
.zshrc) or bash (env in.bashrc) got a false negative.