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
Setting PATH in a project's devbox.json#env will override that setting in made in any plugins. I haven't tested what happens if two plugins try to set PATH but expect it would be a "last wins" situation.
A workaround is to set PATH in shell.init_hook rather than in env. This is a bit more verbose but appears to always work as expected. A quick fix for the ruby plugin might be to do this, i.e.
Ideally env vars in plugins would be expanded sequentially so that PATH could be modified by multiple plugins. But I'm not sure how difficult that would be to implement.
What happened?
Setting
PATH
in a project'sdevbox.json#env
will override that setting in made in any plugins. I haven't tested what happens if two plugins try to setPATH
but expect it would be a "last wins" situation.A workaround is to set
PATH
inshell.init_hook
rather than inenv
. This is a bit more verbose but appears to always work as expected. A quick fix for the ruby plugin might be to do this, i.e.Ideally env vars in plugins would be expanded sequentially so that
PATH
could be modified by multiple plugins. But I'm not sure how difficult that would be to implement.Steps to reproduce
cd $(mktemp -d) && devbox init && devbox generate direnv
env.PATH
):devbox add ruby
echo $PATH | grep ".devbox/virtenv/ruby/bin"
"env": { "PATH": "/path/to/my/bin:$PATH" }
todevbox.json
echo $PATH | grep "/path/to/my/bin"
echo $PATH | grep ".devbox/virtenv/ruby/bin"
(no result)Command
No response
devbox.json
Devbox version
0.11.0
Nix version
2.18.1
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
No response
The text was updated successfully, but these errors were encountered: