Commit d4bfa86
authored
[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 none1 parent 149c822 commit d4bfa86
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
0 commit comments