Zed agent terminal tool use with direnv #35231
suned
started this conversation in
LLMs and Zed Agent
Replies: 1 comment
-
So after a lot of digging, it turns out that my direnv is actually loaded in the terminal tool use shell. I was setting DYLD_LIBRARY_PATH in my nix shell and looking for it in the terminal tool use shell, but DYLD_LIBRARY_PATH was stripped from the shell env by apple SIP. I've yet to find a good workaround for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use direnv extensively to setup my environment (e.g with nix). When the Zed agent uses the terminal tool, the non-interactive, non-login shell does not run the direnv shell hook or export, and thus many commands such as running unit tests that depend on the environment being configured correctly do not work. As a workaround I've added an agent rule to always prepend shell commands with
eval "$(direnv export bash)" && ...
, but it would be nice if there was a more reliable way to do this.Has anyone else run into this issue?
Beta Was this translation helpful? Give feedback.
All reactions