Commit c282015
authored
[easy] added env variable to distinguish pure shell (#2024)
## Summary
`devbox shell` and `devbox shell --pure` have differences in inheriting
the host shell's env variables. But there is no devbox-defined env
variable for users and devbox itself to know if it is in a pure shell or
regular shell.
This PR sets a `DEVBOX_PURE_SHELL=1` env variable to help fix that
issue.
This will allow users to differentiate and customize their setup based
on if they're in a pure shell or not. For example, not sourcing
`.bashrc` if in a pure shell.
## How was it tested?
- `devbox run build`
- `devbox shell` then `env | grep "DEVBOX_PURE_SHELL"`
- exit
- `devbox shell --pure` then `env | grep "DEVBOX_PURE_SHELL"`
- confirm the env variable is set for pure shell and not for regular
shell.1 parent 7034939 commit c282015
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1275 | 1275 | | |
1276 | 1276 | | |
1277 | 1277 | | |
| 1278 | + | |
| 1279 | + | |
1278 | 1280 | | |
1279 | 1281 | | |
1280 | 1282 | | |
| |||
0 commit comments