fix: use BASH_ENV for non-interactive shell config loading #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bash-env-for-agent-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Agent environment variables from AGENTS.md were not being loaded for non-interactive shell commands (
bash -c).Root Cause
/etc/bash.bashrchas a guard that exits early for non-interactive shells:The previous fix appended config sourcing to the bottom of bash.bashrc — after this guard — so it never ran for
bash -ccommands.Solution
Use
BASH_ENV— the standard environment variable that bash reads for non-interactive shell scripts. This replaces the 5-line bash.bashrc hack with a singleENVdirective.Testing
Verified with the current image + env override: