Closed jlgeering closed 1 month ago
@mrnugget This seems to be the last thing I've found that doesn't appear to use the environment variables from the shell Zed was launched in.
In my case I'm using chruby
which puts a selected ruby version in my PATH
. From the shell Zed is launched in, I'm using the correct ruby, but when the formatter runs, it's using the default system ruby.
@mrnugget This seems to be the last thing I've found that doesn't appear to use the environment variables from the shell Zed was launched in.
Good catch! You're right, yeah, it is the only place missing the env.
Here's a draft PR: https://github.com/zed-industries/zed/pull/18611
Haven't tested it yet and the code needs to be better. Happy if someone wants to pick it up, but this week I really have to focus on SSH remoting. Will pick this up as soon as possible.
Check for existing issues
Describe the bug / provide steps to reproduce it
install a formatter "only in project folder" and make it available with direnv (in my case using nix)
=> the formatter is not available in my normal shell PATH, only in the "direnv PATH"
and configure direnv + external formatter (using treefmt2 as an example)
nothing happens on
editor:format
(see also attached zed.log)when the formatter is available in my normal shell path / installed globally => formatting works
Environment
Zed: v0.153.6 (Zed) OS: macOS 14.5.0 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log