jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.94k stars 191 forks source link

[easy] added env variable to distinguish pure shell #2024

Closed mohsenari closed 2 months ago

mohsenari commented 2 months ago

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?