fix: source agent config in non-login shells too #3

Merged
brad merged 1 commit from fix-non-login-shells into main 2026-02-12 23:27:26 -08:00
Owner

Problem

/etc/profile.d/ scripts only run in login shells. When you run docker exec bash (the default), you get a non-login shell and the env vars from AGENTS.md are not loaded.

Fix

Also source the agent config from /etc/bash.bashrc which runs for all interactive bash shells.

Testing

After rebuilding:

# Both should now work:
docker exec -it <container> bash      # non-login (default)
docker exec -it <container> bash -l   # login shell

# Both should show:
echo $WORKSPACE_PATH
## Problem `/etc/profile.d/` scripts only run in **login shells**. When you run `docker exec bash` (the default), you get a non-login shell and the env vars from AGENTS.md are not loaded. ## Fix Also source the agent config from `/etc/bash.bashrc` which runs for all interactive bash shells. ## Testing After rebuilding: ```bash # Both should now work: docker exec -it <container> bash # non-login (default) docker exec -it <container> bash -l # login shell # Both should show: echo $WORKSPACE_PATH ```
profile.d scripts only run in login shells, but docker exec bash
starts a non-login shell. Add sourcing to /etc/bash.bashrc so env
vars are available in both cases.
brad merged commit 6defd0dcd8 into main 2026-02-12 23:27:26 -08:00
brad deleted branch fix-non-login-shells 2026-02-12 23:27:26 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commune/sandbox!3
No description provided.