zsh: Move $PATH update export to zshrc#8
Merged
Merged
Conversation
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.
Problem
export PATH="$PATH:/home/realu/.foundry/bin"inzshenvwas re-appending Foundry on every source.main_bash_setupsourceszshenvand runs twice during normalzshrcstartup (lines 9 and 321), so each new shell accumulated duplicate Foundry entries. Runningmyrcstacked more copies.Fix
zshenvzshrcnext to the other toolchain PATH exports (after linuxbrew)zshrcruns once per shell, so Foundry is added exactly once. Re-sourcingzshenvviamain_bash_setupormyrcno longer duplicates the entry.Note
Low Risk
Shell startup PATH ordering only; no auth, data, or application logic changes.
Overview
Fixes duplicate Foundry entries in
PATHby movingexport PATH="$PATH:$HOME/.foundry/bin"out ofzshenvand intozshrcbeside the linuxbrew toolchain line.main_bash_setupre-sourceszshenvduring normal startup (early and again near the end ofzshrc) and when reloading config viamyrc, so a PATH append inzshenvran multiple times per shell.zshrcis evaluated once per interactive shell, so Foundry is prepended exactly once.Reviewed by Cursor Bugbot for commit 76d6e9f. Configure here.