Conversation
…shells Previously, the installer only wrote PATH exports to ~/.bashrc and ~/.zshrc on Linux. This meant the PATH was only available in interactive shells, not in login shells, SSH sessions, cron jobs, or other non-interactive environments. Now also writes to ~/.profile on Linux (without creating ~/.bash_profile, which would break Ubuntu's convention where ~/.profile sources ~/.bashrc). https://claude.ai/code/session_01Xy8SLn7cu5xwVB4NKWBiQX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends the PATH management on Linux systems to include
.profilein addition to.bashrc. This ensures that the PATH is properly configured for login shells, SSH sessions, cron jobs, and other non-interactive shell environments that don't source.bashrc.Key Changes
.profilesupport: ModifiedUnixPathManager.addToPath()to write PATH exports to.profileon Linux systems, while continuing to avoid creating.bash_profile(which would break Ubuntu's convention where.profilesources.bashrc).bash_profilewhen neither.bash_profilenor.profileexistNO_AUTO_PATH_MARKERin.profileto allow users to prevent automatic PATH modificationstestAddToPathOnLinuxCreatesProfileForNonInteractiveShells: Verifies.profileis created on Linux with proper PATH exporttestAddToPathOnLinuxRespectsNoAutoPathInProfile: Ensures the opt-out marker is respected in.profile.profilehandling in various scenariosImplementation Details
.profileis now always updated (or created) alongside.bashrcand.zshrc.profilecontent is preserved when updating.bash_profileis never created on Linux to maintain compatibility with Ubuntu's shell configuration chainhttps://claude.ai/code/session_01Xy8SLn7cu5xwVB4NKWBiQX