Skip to content

fix(env): check all shell profiles in vp env doctor IDE integration#878

Open
MahmoodKhalil57 wants to merge 1 commit intovoidzero-dev:mainfrom
MahmoodKhalil57:fix/doctor-profile-detection
Open

fix(env): check all shell profiles in vp env doctor IDE integration#878
MahmoodKhalil57 wants to merge 1 commit intovoidzero-dev:mainfrom
MahmoodKhalil57:fix/doctor-profile-detection

Conversation

@MahmoodKhalil57
Copy link

@MahmoodKhalil57 MahmoodKhalil57 commented Mar 14, 2026

Summary

  • The install script writes env sourcing to .zshrc, .bashrc, .bash_profile, and .profile
  • But vp env doctor only checked .zshenv + .profile (macOS) or .profile alone (Linux)
  • This caused false "IDE integration not set up" warnings on Linux with zsh/bash

Fixes #881

Now checks all profiles the install script may have written to, matching the same set used by vp implode for cleanup.

Context

install.sh writes to:

  • zsh: .zshenv + .zshrc
  • bash: .bash_profile + .bashrc + .profile

doctor.rs only checked:

  • macOS: .zshenv, .profile
  • Linux: .profile

So a Linux user running zsh (env in .zshrc) or bash (env in .bashrc) got a false negative.

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>
@netlify
Copy link

netlify bot commented Mar 14, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 84eb7fb
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69b58851a322280008d4fc3a

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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"];

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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(env): vp env doctor misses most shell profiles when checking IDE integration

1 participant