You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[direnv] Fix a bug with devbox shell enabled & direnv (#460)
## Summary
With recent changes to direnv integration. cd-ing into a direnv
integration devbox project would prevent the user to run `devbox shell`.
That is because the env variable `DEVBOX_SHELL_ENABLED` gets set
alongside others with direnv integration even though the user may not be
inside a devbox shell.
This change keeps a back up of the value of `DEVBOX_SHELL_ENABLED`
before letting direnv make any changes to env variables. Then puts the
backed up value back for `DEVBOX_SHELL_ENABLED`.
## How was it tested?
- cd into a direnv directory
- confirm direnv has set devbox's env variables
- run `./devbox shell`
- confirm it goes into the shell successfully
- while in shell run `cd ..` and then `cd` back into the directory
- confirm `DEVBOX_SHELL_ENABLED` is still set to 1
- exit from devbox shell
- confirm `DEVBOX_SHELL_ENABLED` is either 0 or none
0 commit comments