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
## Summary
Fixes issue introduced in #1709
`devbox run` uses `sh` instead of native shell. So init hooks must
always be `sh` compatible for `run`. On the other hand, `devbox shell`
uses native shell so init hooks must be `fish` if the native shell is
fish.
This is ugly, but it's how it has always worked.
#1709 introduced recursion
protection that would be `fish` or `sh` depending on native shell. This
worked fine for `devbox shell` but would break `devbox run`.
This change fixes that by creating 2 hooks files, one fish and one sh
and sourcing the correct one in shellrc, while still always using the
`sh` for run.
cc: @Lagoja
## How was it tested?
```
devbox run echo 5
devbox shell
SHELL=fish devbox run echo 5
SHELL=fish devbox shell
```
0 commit comments