feat: add sourcing of rc files to shell snapshot#9150
Conversation
This reverts commit 6d4740b.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77027eccae
ℹ️ 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".
|
No tests so sad. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0791eace4
ℹ️ 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".
| r##"if [ -z "$BASH_ENV" ] && [ -r "$HOME/.bashrc" ]; then | ||
| . "$HOME/.bashrc" | ||
| fi |
There was a problem hiding this comment.
Avoid double-sourcing .bashrc in login snapshot
Because the snapshot is executed via bash -lc, bash already reads the login profile (~/.bash_profile/~/.profile) before running the command. On most systems those files source ~/.bashrc, so the new unconditional . "$HOME/.bashrc" runs the rc file a second time. That can duplicate PATH entries and other side effects, producing a snapshot that does not match the real login environment for those users. Consider adding a sentinel (or detecting prior rc loading) to avoid re-sourcing when the login profile already did it.
Useful? React with 👍 / 👎.
No description provided.